From c46bf0ec4fd117ee553d3a2c667d3cfe1e47c4fe Mon Sep 17 00:00:00 2001 From: ssongliu Date: Fri, 2 Sep 2022 10:57:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=9F=E4=B8=80=E7=BB=88=E7=AB=AF?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=88=B0=E4=B8=80=E4=B8=AA=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../header/components/Breadcrumb.vue | 2 +- frontend/src/lang/modules/en.ts | 9 +- frontend/src/lang/modules/zh.ts | 1 - frontend/src/routers/modules/terminal.ts | 31 +-- frontend/src/views/terminal/command/index.vue | 9 +- frontend/src/views/terminal/host/index.vue | 9 +- frontend/src/views/terminal/index.vue | 239 +++++++++++------- 7 files changed, 163 insertions(+), 137 deletions(-) diff --git a/frontend/src/components/app-layout/header/components/Breadcrumb.vue b/frontend/src/components/app-layout/header/components/Breadcrumb.vue index b35370b13..1708e96af 100644 --- a/frontend/src/components/app-layout/header/components/Breadcrumb.vue +++ b/frontend/src/components/app-layout/header/components/Breadcrumb.vue @@ -3,7 +3,7 @@ {{ $t('menu.home') }} - {{ item.meta?.title }} + {{ $t(item.meta?.title as string) }} diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index c3e64debc..04ed32873 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -13,18 +13,20 @@ export default { }, table: { name: 'Name', + group: 'Group', createdAt: 'Creation Time', + date: 'Date', updatedAt: 'Update Time', operate: 'Operations', - message: 'message', + message: 'Message', + description: 'Description', }, msg: { delete: 'This operation cannot be rolled back. Do you want to continue', - title: 'Delete', + deleteTitle: 'Delete', deleteSuccess: 'Delete Success', loginSuccess: 'Login Success', requestTimeout: 'The request timed out, please try again later', - deleteTitle: 'Delete', operationSuccess: 'Successful operation', infoTitle: 'Hint', sureLogOut: 'Are you sure you want to log out?', @@ -103,6 +105,7 @@ export default { quickCommand: 'quick command', groupDeleteHelper: 'After the group is removed, all connections in the group will be migrated to the default group. Confirm the information', + quickCmd: 'Quick command', addHost: 'Add Host', localhost: 'Localhost', name: 'Name', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 1cb875d2d..3ca0593b8 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -67,7 +67,6 @@ export default { terminal: '终端管理', operations: '操作记录', }, - home: { welcome: '欢迎使用', }, diff --git a/frontend/src/routers/modules/terminal.ts b/frontend/src/routers/modules/terminal.ts index 3042d10ba..525aed243 100644 --- a/frontend/src/routers/modules/terminal.ts +++ b/frontend/src/routers/modules/terminal.ts @@ -1,5 +1,4 @@ import { Layout } from '@/routers/constant'; -import i18n from '@/lang'; const terminalRouter = { sort: 2, @@ -7,7 +6,7 @@ const terminalRouter = { component: Layout, redirect: '/terminal', meta: { - title: i18n.global.t('menu.terminal'), + title: 'menu.terminal', icon: 'monitor', }, children: [ @@ -18,32 +17,8 @@ const terminalRouter = { meta: { requiresAuth: true, key: 'Terminal', - title: i18n.global.t('terminal.conn'), - icon: 'connection', - activeMenu: '/terminals', - }, - }, - { - path: '/terminals/host', - name: 'Host', - component: () => import('@/views/terminal/host/index.vue'), - meta: { - requiresAuth: true, - key: 'Host', - title: i18n.global.t('terminal.hostList'), - icon: 'platform', - activeMenu: '/terminals', - }, - }, - { - path: '/terminals/command', - name: 'Command', - component: () => import('@/views/terminal/command/index.vue'), - meta: { - requiresAuth: true, - key: 'Command', - title: i18n.global.t('terminal.quickCmd'), - icon: 'reading', + title: 'terminal.conn', + icon: 'Connection', activeMenu: '/terminals', }, }, diff --git a/frontend/src/views/terminal/command/index.vue b/frontend/src/views/terminal/command/index.vue index 28e50b10a..cef095287 100644 --- a/frontend/src/views/terminal/command/index.vue +++ b/frontend/src/views/terminal/command/index.vue @@ -1,5 +1,5 @@