fix: 修复i18n key拼写错误(dmin->admin)和dashboard对象引用问题
This commit is contained in:
@@ -102,7 +102,7 @@ export function getColumns(actions: {
|
||||
cell: ({ row }) => {
|
||||
const status = row.getValue('status') as string
|
||||
const isActive = status === 'active'
|
||||
return h(Badge, { variant: isActive ? 'default' : 'destructive' }, () => t(`dmin.cardTypes.statusOptions.${status}`))
|
||||
return h(Badge, { variant: isActive ? 'default' : 'destructive' }, () => t(`admin.cardTypes.statusOptions.${status}`))
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -199,7 +199,7 @@ onMounted(() => {
|
||||
</UiSelectTrigger>
|
||||
<UiSelectContent>
|
||||
<UiSelectItem value="integer">
|
||||
{{ t('admin.cloudConstants.types.integer') }}
|
||||
{{ t('aadmin.cloudConstants.types.integer') }}
|
||||
</UiSelectItem>
|
||||
<UiSelectItem value="decimal">
|
||||
{{ t('admin.cloudConstants.types.decimal') }}
|
||||
@@ -294,7 +294,7 @@ onMounted(() => {
|
||||
</div>
|
||||
<div class="flex justify-between text-sm">
|
||||
<span class="text-muted-foreground">{{ t('admin.cloudConstants.create.type') }}</span>
|
||||
<span>{{ t(`dmin.cloudConstants.types.${form.var_type}`) }}</span>
|
||||
<span>{{ t(`admin.cloudConstants.types.${form.var_type}`) }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between text-sm">
|
||||
<span class="text-muted-foreground">{{ t('admin.cloudConstants.create.key') }}</span>
|
||||
|
||||
@@ -432,7 +432,7 @@ onMounted(() => {
|
||||
</div>
|
||||
<div class="flex justify-between text-sm">
|
||||
<span class="text-muted-foreground">{{ t('admin.cloudVariables.create.type') }}</span>
|
||||
<span>{{ t(`dmin.cloudVariables.types.${form.var_type}`) }}</span>
|
||||
<span>{{ t(`.cloudVariables.types.${form.var_type}`) }}</span>
|
||||
</div>
|
||||
<div v-if="form.var_type === 'stream'" class="flex justify-between text-sm">
|
||||
<span class="text-muted-foreground">最大记录数</span>
|
||||
|
||||
@@ -478,7 +478,7 @@ onUnmounted(() => {
|
||||
|
||||
<template>
|
||||
<BasicPage
|
||||
:title="t('admin.dashboard')"
|
||||
:title="t('admin.dashboard.title')"
|
||||
:description="`${t('admin.welcomeBack')}, ${currentUser?.username || t('admin.developer')}`"
|
||||
>
|
||||
<div v-if="loading" class="flex items-center justify-center py-12">
|
||||
|
||||
@@ -269,7 +269,7 @@ export function getColumns(t: Composer['t']): ColumnDef<Log>[] {
|
||||
cell: ({ row }) => {
|
||||
const action = row.getValue('action') as string
|
||||
if (!action) return '-'
|
||||
const actionKey = `dmin.logs.actions.${action}`
|
||||
const actionKey = `.logs.actions.${action}`
|
||||
const translated = t(actionKey)
|
||||
return translated === actionKey ? action : translated
|
||||
},
|
||||
|
||||
@@ -102,7 +102,7 @@ export function getColumns(actions: {
|
||||
cell: ({ row }) => {
|
||||
const status = row.getValue('status') as string
|
||||
const isActive = status === 'active'
|
||||
return h(Badge, { variant: isActive ? 'default' : 'destructive' }, () => t(`dmin.cardTypes.statusOptions.${status}`))
|
||||
return h(Badge, { variant: isActive ? 'default' : 'destructive' }, () => t(`admin.cardTypes.statusOptions.${status}`))
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -294,7 +294,7 @@ onMounted(() => {
|
||||
</div>
|
||||
<div class="flex justify-between text-sm">
|
||||
<span class="text-muted-foreground">{{ t('admin.cloudConstants.create.type') }}</span>
|
||||
<span>{{ t(`dmin.cloudConstants.types.${form.var_type}`) }}</span>
|
||||
<span>{{ t(`.cloudConstants.types.${form.var_type}`) }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between text-sm">
|
||||
<span class="text-muted-foreground">{{ t('admin.cloudConstants.create.key') }}</span>
|
||||
|
||||
@@ -412,7 +412,7 @@ onMounted(() => {
|
||||
</div>
|
||||
<div class="flex justify-between text-sm">
|
||||
<span class="text-muted-foreground">{{ t('admin.cloudVariables.create.type') }}</span>
|
||||
<span>{{ t(`dmin.cloudVariables.types.${form.var_type}`) }}</span>
|
||||
<span>{{ t(`.cloudVariables.types.${form.var_type}`) }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between text-sm">
|
||||
<span class="text-muted-foreground">{{ t('admin.cloudVariables.create.key') }}</span>
|
||||
|
||||
@@ -478,7 +478,7 @@ onUnmounted(() => {
|
||||
|
||||
<template>
|
||||
<BasicPage
|
||||
:title="t('admin.dashboard')"
|
||||
:title="t('admin.dashboard.title')"
|
||||
:description="`${t('admin.welcomeBack')}, ${currentUser?.username || t('admin.developer')}`"
|
||||
>
|
||||
<div v-if="loading" class="flex items-center justify-center py-12">
|
||||
|
||||
Reference in New Issue
Block a user