mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-08 01:49:58 +00:00
fix: translation button still display when posts have no contents (#2027)
This commit is contained in:
parent
574d72af61
commit
cbba846c4f
1 changed files with 5 additions and 1 deletions
|
@ -12,7 +12,11 @@ const {
|
||||||
} = useTranslation(status, getLanguageCode())
|
} = useTranslation(status, getLanguageCode())
|
||||||
const preferenceHideTranslation = usePreferences('hideTranslation')
|
const preferenceHideTranslation = usePreferences('hideTranslation')
|
||||||
|
|
||||||
const showButton = computed(() => !preferenceHideTranslation.value && isTranslationEnabled)
|
const showButton = computed(() =>
|
||||||
|
!preferenceHideTranslation.value
|
||||||
|
&& isTranslationEnabled
|
||||||
|
&& status.content.trim().length,
|
||||||
|
)
|
||||||
|
|
||||||
let translating = $ref(false)
|
let translating = $ref(false)
|
||||||
async function toggleTranslation() {
|
async function toggleTranslation() {
|
||||||
|
|
Loading…
Reference in a new issue