feat: use pointer when clickable status (#113)

pull/118/head
Shinigami 2022-11-26 01:04:31 +01:00 zatwierdzone przez GitHub
rodzic 4bb2910761
commit 175e31288a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 10 dodań i 3 usunięć

Wyświetl plik

@ -1,17 +1,24 @@
<script setup lang="ts">
import type { Status } from 'masto'
const { status } = defineProps<{
const { status, withAction = true } = defineProps<{
status: Status
withAction?: boolean
}>()
const { translation } = useTranslation(status)
</script>
<template>
<div class="status-body" whitespace-pre-wrap break-words>
<div class="status-body" whitespace-pre-wrap break-words :class="{ 'with-action': withAction }">
<ContentRich
:content="translation.visible ? translation.text : status.content"
:emojis="status.emojis"
/>
</div>
</template>
<style>
.status-body.with-action p {
cursor: pointer;
}
</style>

Wyświetl plik

@ -22,7 +22,7 @@ const date = useFormattedDateTime(status.createdAt)
<template #spoiler>
{{ status.spoilerText }}
</template>
<StatusBody :status="status" text-2xl />
<StatusBody :status="status" :with-action="false" text-2xl />
<StatusMedia
v-if="status.mediaAttachments?.length"
:status="status"