forked from Mirrors/elk
feat: show translate below content (#185)
This commit is contained in:
parent
729b36a606
commit
72d40edbb6
1 changed files with 6 additions and 3 deletions
|
@ -6,17 +6,20 @@ const { status, withAction = true } = defineProps<{
|
||||||
withAction?: boolean
|
withAction?: boolean
|
||||||
}>()
|
}>()
|
||||||
const { translation } = useTranslation(status)
|
const { translation } = useTranslation(status)
|
||||||
const content = $computed(() => translation.visible ? translation.text : status.content)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="status-body" whitespace-pre-wrap break-words :class="{ 'with-action': withAction }">
|
<div class="status-body" whitespace-pre-wrap break-words :class="{ 'with-action': withAction }">
|
||||||
<ContentRich
|
<ContentRich
|
||||||
v-if="content"
|
v-if="status.content"
|
||||||
:content="content"
|
:content="status.content"
|
||||||
:emojis="status.emojis"
|
:emojis="status.emojis"
|
||||||
/>
|
/>
|
||||||
<div v-else h-3 />
|
<div v-else h-3 />
|
||||||
|
<template v-if="translation.visible">
|
||||||
|
<div my2 h-px border="b base" bg-base />
|
||||||
|
<ContentRich :content="translation.text" :emojis="status.emojis" />
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue