frontend: normalize profile and admin i18n cleanup

This commit is contained in:
IanShaw027
2026-04-21 22:26:35 +08:00
parent a6b919eb53
commit 20062b44dc
10 changed files with 247 additions and 219 deletions

View File

@@ -29,7 +29,11 @@
<span
:class="['badge', user?.status === 'active' ? 'badge-success' : 'badge-danger']"
>
{{ user?.status }}
{{
user?.status === 'active'
? t('common.active')
: t('common.disabled')
}}
</span>
</div>
</div>
@@ -80,7 +84,7 @@ const props = defineProps<{
const { t } = useI18n()
const avatarUrl = computed(() => props.user?.avatar_url?.trim() || '')
const displayName = computed(() => props.user?.username?.trim() || props.user?.email?.trim() || 'User')
const displayName = computed(() => props.user?.username?.trim() || props.user?.email?.trim() || t('profile.user'))
const avatarInitial = computed(() => displayName.value.charAt(0).toUpperCase() || 'U')
const providerLabels = computed<Record<UserAuthProvider, string>>(() => ({