From 50c01762e78e781ab129fdd828eabc486eb383c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=98=AD?= <81747598+lan-yonghui@users.noreply.github.com> Date: Fri, 20 Dec 2024 15:04:26 +0800 Subject: [PATCH] feat: Open international professional features (#7472) --- .../src/components/system-upgrade/index.vue | 8 +- .../src/layout/components/Sidebar/index.vue | 11 +- frontend/src/routers/index.ts | 2 +- frontend/src/styles/element.scss | 2 +- frontend/src/views/home/index.vue | 2 +- frontend/src/views/setting/about/index.vue | 2 +- frontend/src/views/setting/index.vue | 6 - frontend/src/views/setting/panel/index.vue | 4 +- .../src/views/toolbox/clam/operate/index.vue | 157 +++++++++--------- 9 files changed, 100 insertions(+), 94 deletions(-) diff --git a/frontend/src/components/system-upgrade/index.vue b/frontend/src/components/system-upgrade/index.vue index 65875f2c1..093e07fa5 100644 --- a/frontend/src/components/system-upgrade/index.vue +++ b/frontend/src/components/system-upgrade/index.vue @@ -5,8 +5,8 @@ {{ $t('setting.forum') }} - - + + {{ $t('setting.doc2') }} @@ -17,7 +17,7 @@ - {{ $t(globalStore.isIntl || !isProductPro ? 'license.community' : 'license.pro') }} + {{ $t(!isProductPro ? 'license.community' : 'license.pro') }} {{ version }} @@ -125,6 +125,8 @@ const handleClose = () => { const toLxware = () => { if (!globalStore.isIntl) { window.open('https://www.lxware.cn/1panel' + '', '_blank', 'noopener,noreferrer'); + } else { + window.open('https://1panel.hk' + '', '_blank', 'noopener,noreferrer'); } }; diff --git a/frontend/src/layout/components/Sidebar/index.vue b/frontend/src/layout/components/Sidebar/index.vue index fa2c235b8..f0d9ddb54 100644 --- a/frontend/src/layout/components/Sidebar/index.vue +++ b/frontend/src/layout/components/Sidebar/index.vue @@ -134,11 +134,9 @@ function getCheckedLabels(json: Node): string[] { const search = async () => { await checkIsSystemIntl(); let checkedLabels: any[] = []; - if (!globalStore.isIntl) { - const res = await getSettingInfo(); - const json: Node = JSON.parse(res.data.xpackHideMenu); - checkedLabels = getCheckedLabels(json); - } + const res = await getSettingInfo(); + const json: Node = JSON.parse(res.data.xpackHideMenu); + checkedLabels = getCheckedLabels(json); let rstMenuList: RouteRecordRaw[] = []; menuStore.menuList.forEach((item) => { @@ -146,6 +144,9 @@ const search = async () => { let menuChildren: RouteRecordRaw[] = []; if (menuItem.path === '/xpack') { if (checkedLabels.length) { + menuItem.children = menuItem.children.filter((child: any) => { + return !(globalStore.isIntl && child.path.includes('/xpack/alert')); + }); menuItem.children.forEach((child: any) => { for (const str of checkedLabels) { if (child.name === str) { diff --git a/frontend/src/routers/index.ts b/frontend/src/routers/index.ts index 04a935bf4..48af30d7a 100644 --- a/frontend/src/routers/index.ts +++ b/frontend/src/routers/index.ts @@ -10,7 +10,7 @@ router.beforeEach((to, from, next) => { axiosCanceler.removeAllPending(); const globalStore = GlobalStore(); - if (globalStore.isIntl && to.path.includes('xpack')) { + if (globalStore.isIntl && to.path.includes('/xpack/alert')) { next({ name: '404' }); NProgress.done(); return; diff --git a/frontend/src/styles/element.scss b/frontend/src/styles/element.scss index 98fd4c9ab..ce80a3b08 100644 --- a/frontend/src/styles/element.scss +++ b/frontend/src/styles/element.scss @@ -49,7 +49,7 @@ html { --panel-terminal-tag-hover-text-color: #575758; --panel-terminal-bg-color: #1e1e1e; --panel-logs-bg-color: #1e1e1e; - --panel-alert-bg-color: rgba(0, 94, 235, 0.03);; + --panel-alert-bg-color: rgba(0, 94, 235, 0.03); --panel-alert-bg: #e2e4ec; --panel-path-bg: #ffffff; diff --git a/frontend/src/views/home/index.vue b/frontend/src/views/home/index.vue index 24adc4ee3..7dfd4b745 100644 --- a/frontend/src/views/home/index.vue +++ b/frontend/src/views/home/index.vue @@ -9,7 +9,7 @@ ]" > - + {{ $t('license.levelUpPro') }} diff --git a/frontend/src/views/setting/about/index.vue b/frontend/src/views/setting/about/index.vue index 598c79a0c..7bef961f4 100644 --- a/frontend/src/views/setting/about/index.vue +++ b/frontend/src/views/setting/about/index.vue @@ -16,7 +16,7 @@ - + {{ $t('setting.doc2') }} diff --git a/frontend/src/views/setting/index.vue b/frontend/src/views/setting/index.vue index 399eb0a24..b476a10d0 100644 --- a/frontend/src/views/setting/index.vue +++ b/frontend/src/views/setting/index.vue @@ -9,8 +9,6 @@ diff --git a/frontend/src/views/setting/panel/index.vue b/frontend/src/views/setting/panel/index.vue index 15264a9f5..513a20309 100644 --- a/frontend/src/views/setting/panel/index.vue +++ b/frontend/src/views/setting/panel/index.vue @@ -124,7 +124,7 @@ - + @@ -166,7 +166,7 @@ {{ $t('setting.developerModeHelper') }} - + diff --git a/frontend/src/views/toolbox/clam/operate/index.vue b/frontend/src/views/toolbox/clam/operate/index.vue index c5e30e4d5..32bdfd8dc 100644 --- a/frontend/src/views/toolbox/clam/operate/index.vue +++ b/frontend/src/views/toolbox/clam/operate/index.vue @@ -50,81 +50,90 @@ + + + + + + + + + + + + + + + + + {{ $t('commons.units.dayUnit') }} + + + + + + + + + {{ $t('commons.units.hourUnit') }} + + + + + + + + + {{ $t('commons.units.minuteUnit') }} + + + + + + + + + {{ $t('commons.units.secondUnit') }} + + + + + + + + + {{ $t('toolbox.clam.alertHelper') }} + + {{ $t('license.levelUpPro') }} + + + - - - - - - - - - - - - - - - - {{ $t('commons.units.dayUnit') }} - - - - - - - - - {{ $t('commons.units.hourUnit') }} - - - - - - - - - {{ $t('commons.units.minuteUnit') }} - - - - - - - - - {{ $t('commons.units.secondUnit') }} - - - - - - {{ $t('alert.clamHelper') }}