feat: use pointer when clickable status (#113)

This commit is contained in:
Shinigami 2022-11-26 01:04:31 +01:00 committed by GitHub
parent 4bb2910761
commit 175e31288a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View file

@ -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>

View file

@ -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"