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

View file

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