From 8f5028463a42042d58e92a062f5dc648ef3414b9 Mon Sep 17 00:00:00 2001 From: ssongliu Date: Tue, 7 Mar 2023 11:30:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E9=99=90=E5=88=B6=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/components.d.ts | 1 - frontend/src/components/upload/index.vue | 14 +++++++------ frontend/src/lang/modules/en.ts | 7 ++++--- frontend/src/lang/modules/zh.ts | 5 +++-- .../host/terminal/host/change-group/index.vue | 14 +++++++------ .../src/views/host/terminal/host/index.vue | 15 +++++++++++--- .../views/host/terminal/terminal/index.vue | 20 ++++++++++++------- 7 files changed, 48 insertions(+), 28 deletions(-) diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 193ef3c0c..ef05b9b18 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -73,7 +73,6 @@ declare module 'vue' { FileList: typeof import('./src/components/file-list/index.vue')['default'] FileRole: typeof import('./src/components/file-role/index.vue')['default'] Footer: typeof import('./src/components/app-layout/footer/index.vue')['default'] - Gropu: typeof import('./src/components/gropu/index.vue')['default'] Group: typeof import('./src/components/group/index.vue')['default'] InfiniteScroll: typeof import('element-plus/es')['ElInfiniteScroll'] Loading: typeof import('element-plus/es')['ElLoadingDirective'] diff --git a/frontend/src/components/upload/index.vue b/frontend/src/components/upload/index.vue index 87cd2f07d..23cd705cf 100644 --- a/frontend/src/components/upload/index.vue +++ b/frontend/src/components/upload/index.vue @@ -160,10 +160,11 @@ const uploadRef = ref(); const beforeAvatarUpload = (rawFile) => { if (type.value === 'app' || type.value === 'website') { if (!rawFile.name.endsWith('.tar.gz')) { - MsgError(i18n.global.t('database.unSupportType')); + MsgError(i18n.global.t('commons.msg.unSupportType')); return false; - } else if (rawFile.size / 1024 / 1024 > 50) { - MsgError(i18n.global.t('database.unSupportSize')); + } + if (rawFile.size / 1024 / 1024 > 50) { + MsgError(i18n.global.t('commons.msg.unSupportSize', [50])); return false; } return true; @@ -176,10 +177,11 @@ const beforeAvatarUpload = (rawFile) => { !rawFile.name.endsWith('.zip') && !rawFile.name.endsWith('.tgz') ) { - MsgError(i18n.global.t('database.unSupportType')); + MsgError(i18n.global.t('commons.msg.unSupportType')); return false; - } else if (rawFile.size / 1024 / 1024 > 10) { - MsgError(i18n.global.t('database.unSupportSize')); + } + if (rawFile.size / 1024 / 1024 > 10) { + MsgError(i18n.global.t('commons.msg.unSupportSize', [10])); return false; } return true; diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 1d0fb08b6..61b2c2136 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -91,6 +91,8 @@ export default { operate: 'Operate', inputOrSelect: 'Please select or enter', backupSuccess: 'Backup Success', + unSupportType: 'Current file type is not supported!', + unSupportSize: 'The uploaded file exceeds {0}M, please confirm!', }, login: { firstLogin: 'First login, please create an initial administrator user!', @@ -288,8 +290,6 @@ export default { portHelper: 'This port is the exposed port of the container. You need to save the modification separately and restart the container!', - unSupportType: 'Current file type is not supported!', - unSupportSize: 'The uploaded file exceeds 10M, please confirm!', selectFile: 'Select file', supportUpType: 'Only sql, zip, sql.gz, and (tar.gz gz tgz) files within 10 MB are supported', zipFormat: @@ -615,8 +615,9 @@ export default { connTestOk: 'Connection information available', connTestFailed: 'Connection unavailable, please check connection information!', host: 'Host', - createConn: 'Create a connection', + createConn: 'New connection', group: 'Group', + noHost: 'No host', groupChange: 'Change group', expand: 'Expand all', fold: 'All contract', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index a2e264746..f4c3b92ed 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -97,6 +97,8 @@ export default { backupSuccess: '备份成功', restoreSuccess: '备份成功', notFound: '抱歉,您访问的页面不存在', + unSupportType: '不支持当前文件类型!', + unSupportSize: '上传文件超过 {0}M,请确认!', }, login: { firstLogin: '首次登录,请创建初始管理员用户!', @@ -294,8 +296,6 @@ export default { confChange: '配置修改', - unSupportType: '不支持当前文件类型!', - unSupportSize: '上传文件超过 10M,请确认!', selectFile: '选择文件', dropHelper: '将上传文件拖拽到此处,或者', clickHelper: '点击上传', @@ -625,6 +625,7 @@ export default { host: '主机', createConn: '新建连接', group: '分组', + noHost: '暂无主机', groupChange: '切换分组', expand: '全部展开', fold: '全部收缩', diff --git a/frontend/src/views/host/terminal/host/change-group/index.vue b/frontend/src/views/host/terminal/host/change-group/index.vue index c5af6e84c..053b85d79 100644 --- a/frontend/src/views/host/terminal/host/change-group/index.vue +++ b/frontend/src/views/host/terminal/host/change-group/index.vue @@ -9,12 +9,14 @@ - +
+ + +
diff --git a/frontend/src/views/host/terminal/host/index.vue b/frontend/src/views/host/terminal/host/index.vue index 6fa23b607..44315a9af 100644 --- a/frontend/src/views/host/terminal/host/index.vue +++ b/frontend/src/views/host/terminal/host/index.vue @@ -32,7 +32,11 @@