feat(#22): Use translation keys in files
This commit is contained in:
@@ -71,6 +71,8 @@ const user = ref({
|
||||
}
|
||||
})
|
||||
|
||||
const { t: $t } = useI18n()
|
||||
|
||||
const items = computed<DropdownMenuItem[][]>(() => [
|
||||
[
|
||||
{
|
||||
@@ -81,27 +83,27 @@ const items = computed<DropdownMenuItem[][]>(() => [
|
||||
],
|
||||
[
|
||||
{
|
||||
label: 'Profile',
|
||||
label: $t('user.profile'),
|
||||
icon: 'i-lucide-user'
|
||||
},
|
||||
{
|
||||
label: 'Administration',
|
||||
label: $t('user.administration'),
|
||||
icon: 'i-lucide-shield',
|
||||
to: '/administration'
|
||||
},
|
||||
{
|
||||
label: 'Settings',
|
||||
label: $t('user.settings'),
|
||||
icon: 'i-lucide-settings',
|
||||
to: '/settings'
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
label: 'Theme',
|
||||
label: $t('user.theme'),
|
||||
icon: 'i-lucide-palette',
|
||||
children: [
|
||||
{
|
||||
label: 'Primary',
|
||||
label: $t('user.themePrimary'),
|
||||
slot: 'chip',
|
||||
chip: appConfig.ui.colors.primary,
|
||||
content: {
|
||||
@@ -121,7 +123,7 @@ const items = computed<DropdownMenuItem[][]>(() => [
|
||||
}))
|
||||
},
|
||||
{
|
||||
label: 'Neutral',
|
||||
label: $t('user.themeNeutral'),
|
||||
slot: 'chip',
|
||||
chip: appConfig.ui.colors.neutral,
|
||||
content: {
|
||||
@@ -143,11 +145,11 @@ const items = computed<DropdownMenuItem[][]>(() => [
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Appearance',
|
||||
label: $t('user.appearance'),
|
||||
icon: 'i-lucide-sun-moon',
|
||||
children: [
|
||||
{
|
||||
label: 'Light',
|
||||
label: $t('user.light'),
|
||||
icon: 'i-lucide-sun',
|
||||
type: 'checkbox',
|
||||
checked: colorMode.value === 'light',
|
||||
@@ -157,7 +159,7 @@ const items = computed<DropdownMenuItem[][]>(() => [
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Dark',
|
||||
label: $t('user.dark'),
|
||||
icon: 'i-lucide-moon',
|
||||
type: 'checkbox',
|
||||
checked: colorMode.value === 'dark',
|
||||
@@ -175,7 +177,7 @@ const items = computed<DropdownMenuItem[][]>(() => [
|
||||
],
|
||||
[
|
||||
{
|
||||
label: 'Log out',
|
||||
label: $t('user.logout'),
|
||||
icon: 'i-lucide-log-out',
|
||||
async onSelect(e: Event) {
|
||||
e.preventDefault()
|
||||
|
||||
Reference in New Issue
Block a user