From eeb5fa81a1a466ad54676797f7b2ae6aa35905b5 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Thu, 27 Apr 2023 15:18:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=89=E5=85=A8=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96=20(#814)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/components.d.ts | 1 + frontend/src/assets/images/unsafe.svg | 20 ++++++ .../src/components/error-message/unsafe.vue | 66 +++++++++++++++++++ frontend/src/lang/modules/en.ts | 5 +- frontend/src/lang/modules/zh.ts | 4 +- frontend/src/views/login/index.vue | 29 ++------ 6 files changed, 97 insertions(+), 28 deletions(-) create mode 100644 frontend/src/assets/images/unsafe.svg create mode 100644 frontend/src/components/error-message/unsafe.vue diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 2b3ebf489..3cb9f717c 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -90,6 +90,7 @@ declare module 'vue' { TableSetting: typeof import('./src/components/table-setting/index.vue')['default'] Terminal: typeof import('./src/components/terminal/index.vue')['default'] Tooltip: typeof import('./src/components/tooltip/index.vue')['default'] + Unsafe: typeof import('./src/components/error-message/unsafe.vue')['default'] Upload: typeof import('./src/components/upload/index.vue')['default'] VCharts: typeof import('./src/components/v-charts/index.vue')['default'] } diff --git a/frontend/src/assets/images/unsafe.svg b/frontend/src/assets/images/unsafe.svg new file mode 100644 index 000000000..33916c422 --- /dev/null +++ b/frontend/src/assets/images/unsafe.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/components/error-message/unsafe.vue b/frontend/src/components/error-message/unsafe.vue new file mode 100644 index 000000000..8ef1f225a --- /dev/null +++ b/frontend/src/components/error-message/unsafe.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 6a5ae4cc4..74a261126 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -114,8 +114,9 @@ const message = { errorMfaInfo: 'Incorrect authentication information, please try again!', captchaHelper: 'Captcha', errorCaptcha: 'Captcha code error!', - safeEntrance: - 'The command "1pctl user-info" can be used in SSH terminal to view the panel entrance as the secure login has been enabled in the current environment.', + notSafe: 'Access Denied', + safeEntrance1: 'The secure login has been enabled in the current environment', + safeEntrance2: 'Enter the following command on the SSH terminal to view the panel entry: 1pctl user-info', codeInput: 'Please enter the 6-digit verification code of the MFA validator', mfaTitle: 'MFA Certification', mfaCode: 'MFA verification code', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 518024cd6..a289cbca5 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -118,7 +118,9 @@ const message = { errorMfaInfo: '错误的验证信息,请重试!', captchaHelper: '验证码', errorCaptcha: '验证码错误!', - safeEntrance: '当前环境已经开启了安全入口登录,在 SSH 终端输入以下命令来查看面板入口: 1pctl user-info', + notSafe: '暂无权限访问', + safeEntrance1: '当前环境已经开启了安全入口登录', + safeEntrance2: '在 SSH 终端输入以下命令来查看面板入口: 1pctl user-info', codeInput: '请输入 MFA 验证器的 6 位验证码', mfaTitle: 'MFA 认证', mfaCode: 'MFA 验证码', diff --git a/frontend/src/views/login/index.vue b/frontend/src/views/login/index.vue index 4d80accda..f6dc183d0 100644 --- a/frontend/src/views/login/index.vue +++ b/frontend/src/views/login/index.vue @@ -15,11 +15,8 @@ -
-
-

404 NOT FOUND

-

{{ $t('commons.login.safeEntrance') }}

-
+
+
@@ -27,11 +24,12 @@