From 17dd07fe3289bcb9ea71780ce04563c062b6ccc0 Mon Sep 17 00:00:00 2001 From: ssongliu Date: Mon, 17 Apr 2023 11:13:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A6=82=E8=A7=88=E9=A1=B5=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=9C=AA=E5=90=AF=E7=94=A8=E5=AE=89=E5=85=A8=E5=85=A5?= =?UTF-8?q?=E5=8F=A3=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/modules/en.ts | 2 ++ frontend/src/lang/modules/zh.ts | 1 + frontend/src/views/home/index.vue | 30 +++++++++++++++++++--- frontend/src/views/log/operation/index.vue | 6 +++++ 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 3dd1c7d34..24835ff52 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -221,6 +221,8 @@ const message = { }, home: { overview: 'Overview', + entranceHelper: + 'Enabling a secure entrance can help improve system security. If necessary, go to the Control Panel settings, select Security, and enable the secure entrance.', appInstalled: 'App installed', systemInfo: 'System info', hostname: 'Hostname', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index c63b5165c..c09eccb65 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -224,6 +224,7 @@ const message = { }, home: { overview: '概览', + entranceHelper: '设置安全入口有利于提高系统的安全性,如有需要,前往 面板设置-安全 中,启用安全入口', appInstalled: '已安装应用', systemInfo: '系统信息', hostname: '主机名称', diff --git a/frontend/src/views/home/index.vue b/frontend/src/views/home/index.vue index b3a595800..c0e10e7c5 100644 --- a/frontend/src/views/home/index.vue +++ b/frontend/src/views/home/index.vue @@ -8,6 +8,22 @@ }, ]" /> + + + + @@ -109,7 +125,7 @@
(true); @@ -482,7 +500,13 @@ const loadUpgradeStatus = async () => { } }; +const loadSafeStatus = async () => { + const res = await getSettingInfo(); + isSafety.value = res.data.securityEntranceStatus === 'enable'; +}; + onMounted(() => { + loadSafeStatus(); loadUpgradeStatus(); onLoadNetworkOptions(); onLoadIOOptions(); diff --git a/frontend/src/views/log/operation/index.vue b/frontend/src/views/log/operation/index.vue index d9b84e633..932fc4e7b 100644 --- a/frontend/src/views/log/operation/index.vue +++ b/frontend/src/views/log/operation/index.vue @@ -183,6 +183,12 @@ const loadDetail = (log: string) => { if (log.indexOf('[SessionTimeout]') !== -1) { return log.replace('[SessionTimeout]', '[' + i18n.global.t('setting.sessionTimeout') + ']'); } + if (log.indexOf('SecurityEntranceStatus') !== -1) { + return log.replace('[SecurityEntranceStatus]', '[' + i18n.global.t('setting.entrance') + ']'); + } + if (log.indexOf('SecurityEntrance') !== -1) { + return log.replace('[SecurityEntrance]', '[' + i18n.global.t('setting.entrance') + ']'); + } if (log.indexOf('[ExpirationDays]') !== -1) { return log.replace('[ExpirationDays]', '[' + i18n.global.t('setting.expirationTime') + ']'); }