🐛 fix(node-table): Update translations for headers and no data display
This commit is contained in:
parent
3e290d7cb5
commit
eec0b12154
@ -73,7 +73,7 @@ export default function NodeTable() {
|
|||||||
columns={[
|
columns={[
|
||||||
{
|
{
|
||||||
accessorKey: 'id',
|
accessorKey: 'id',
|
||||||
header: 'ID',
|
header: t('id'),
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<TooltipProvider>
|
<TooltipProvider>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
@ -160,7 +160,7 @@ export default function NodeTable() {
|
|||||||
header: t('nodeGroup'),
|
header: t('nodeGroup'),
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
const name = groups?.find((group) => group.id === row.getValue('group_id'))?.name;
|
const name = groups?.find((group) => group.id === row.getValue('group_id'))?.name;
|
||||||
return name ? <Badge variant='outline'>{name}</Badge> : '--';
|
return name ? <Badge variant='outline'>{name}</Badge> : t('noData');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -177,7 +177,7 @@ export default function NodeTable() {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
'--'
|
t('noData')
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -273,17 +273,17 @@ export default function NodeTable() {
|
|||||||
<ConfirmButton
|
<ConfirmButton
|
||||||
key='delete'
|
key='delete'
|
||||||
trigger={<Button variant='destructive'>{t('delete')}</Button>}
|
trigger={<Button variant='destructive'>{t('delete')}</Button>}
|
||||||
title={t('group.confirmDelete')}
|
title={t('confirmDelete')}
|
||||||
description={t('group.deleteWarning')}
|
description={t('deleteWarning')}
|
||||||
onConfirm={async () => {
|
onConfirm={async () => {
|
||||||
await batchDeleteNode({
|
await batchDeleteNode({
|
||||||
ids: rows.map((item) => item.id),
|
ids: rows.map((item) => item.id),
|
||||||
});
|
});
|
||||||
toast.success(t('group.deleteSuccess'));
|
toast.success(t('deleteSuccess'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
}}
|
}}
|
||||||
cancelText={t('group.cancel')}
|
cancelText={t('cancel')}
|
||||||
confirmText={t('group.confirm')}
|
confirmText={t('confirm')}
|
||||||
/>,
|
/>,
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|||||||
@ -63,6 +63,7 @@
|
|||||||
"edit": "Edit",
|
"edit": "Edit",
|
||||||
"editNode": "Edit Node",
|
"editNode": "Edit Node",
|
||||||
"enable": "Enable",
|
"enable": "Enable",
|
||||||
|
"id": "ID",
|
||||||
"form": {
|
"form": {
|
||||||
"allowInsecure": "Allow Insecure",
|
"allowInsecure": "Allow Insecure",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
@ -141,6 +142,7 @@
|
|||||||
"name": "Name",
|
"name": "Name",
|
||||||
"node": "Node",
|
"node": "Node",
|
||||||
"nodeGroup": "Node Group",
|
"nodeGroup": "Node Group",
|
||||||
|
"noData": "--",
|
||||||
"normal": "Normal",
|
"normal": "Normal",
|
||||||
"onlineCount": "Online users",
|
"onlineCount": "Online users",
|
||||||
"onlineUsers": "Online Users",
|
"onlineUsers": "Online Users",
|
||||||
|
|||||||
@ -63,6 +63,7 @@
|
|||||||
"edit": "编辑",
|
"edit": "编辑",
|
||||||
"editNode": "编辑节点",
|
"editNode": "编辑节点",
|
||||||
"enable": "启用",
|
"enable": "启用",
|
||||||
|
"id": "ID",
|
||||||
"form": {
|
"form": {
|
||||||
"allowInsecure": "允许不安全",
|
"allowInsecure": "允许不安全",
|
||||||
"cancel": "取消",
|
"cancel": "取消",
|
||||||
@ -141,6 +142,7 @@
|
|||||||
"name": "名称",
|
"name": "名称",
|
||||||
"node": "节点",
|
"node": "节点",
|
||||||
"nodeGroup": "节点组",
|
"nodeGroup": "节点组",
|
||||||
|
"noData": "--",
|
||||||
"normal": "正常",
|
"normal": "正常",
|
||||||
"onlineCount": "在线人数",
|
"onlineCount": "在线人数",
|
||||||
"onlineUsers": "在线用户",
|
"onlineUsers": "在线用户",
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
||||||
// API 更新时间:
|
// API 更新时间:
|
||||||
// API 唯一标识:
|
// API 唯一标识:
|
||||||
import * as ads from './ads';
|
import * as ads from './ads';
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
||||||
// API 更新时间:
|
// API 更新时间:
|
||||||
// API 唯一标识:
|
// API 唯一标识:
|
||||||
import * as auth from './auth';
|
import * as auth from './auth';
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
||||||
// API 更新时间:
|
// API 更新时间:
|
||||||
// API 唯一标识:
|
// API 唯一标识:
|
||||||
import * as auth from './auth';
|
import * as auth from './auth';
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
||||||
// API 更新时间:
|
// API 更新时间:
|
||||||
// API 唯一标识:
|
// API 唯一标识:
|
||||||
import * as announcement from './announcement';
|
import * as announcement from './announcement';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user