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') + ']'); }