i18n: improve
This commit is contained in:
parent
ba93e6d235
commit
9c83e8bbb6
3 changed files with 10 additions and 8 deletions
|
@ -21,16 +21,14 @@ async function toggleFollow() {
|
|||
}
|
||||
}
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
useCommand({
|
||||
scope: 'Actions',
|
||||
|
||||
order: -2,
|
||||
|
||||
visible: () => command && enable,
|
||||
|
||||
name: () => `${relationship?.following ? 'Unfollow' : 'Follow'} ${getShortHandle(account)}`,
|
||||
name: () => `${relationship?.following ? t('account.unfollow') : t('account.follow')} ${getShortHandle(account)}`,
|
||||
icon: 'i-ri:star-line',
|
||||
|
||||
onActivate: () => toggleFollow(),
|
||||
})
|
||||
</script>
|
||||
|
@ -44,7 +42,7 @@ useCommand({
|
|||
rounded-full flex="~ gap2 center" font-500 w-30 h-fit py1 :class="relationship?.following ? 'text-base border-text-base' : 'text-inverted bg-primary border-primary'" :hover="relationship?.following ? 'border-red text-red' : 'bg-base border-primary text-primary'" @click="toggleFollow"
|
||||
>
|
||||
<template v-if="relationship?.following">
|
||||
<span group-hover="hidden">{{ relationship?.followedBy ? 'Mutuals' : 'Following' }}</span>
|
||||
<span group-hover="hidden">{{ relationship?.followedBy ? $t('account.mutuals') : $t('account.following') }}</span>
|
||||
<span hidden group-hover="inline">{{ $t('account.unfollow') }}</span>
|
||||
</template>
|
||||
<template v-else-if="relationship?.requested">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue