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