1
0
elk/components/status/StatusBody.vue
三咲智子 Kevin Deng acdb94de62
fix: type errors (#802)
2023-01-05 17:48:20 +01:00

34 lines
856 B
Vue

<script setup lang="ts">
import type { Status, StatusEdit } from 'masto'
const { status, withAction = true } = defineProps<{
status: Status | StatusEdit
withAction?: boolean
}>()
const { translation } = useTranslation(status)
</script>
<template>
<div class="status-body" whitespace-pre-wrap break-words :class="{ 'with-action': withAction }">
<ContentRich
v-if="status.content"
class="line-compact"
:content="status.content"
:emojis="status.emojis"
:lang="'language' in status && status.language"
/>
<div v-else />
<template v-if="translation.visible">
<div my2 h-px border="b base" bg-base />
<ContentRich class="line-compact" :content="translation.text" :emojis="status.emojis" />
</template>
</div>
</template>
<style>
.status-body.with-action p {
cursor: pointer;
}
</style>