forked from Mirrors/elk
feat: use pointer when clickable status (#113)
This commit is contained in:
parent
4bb2910761
commit
175e31288a
2 changed files with 10 additions and 3 deletions
|
@ -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>
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue