From a04875f64b58d6304584bf3c5d271cd52a26375c Mon Sep 17 00:00:00 2001 From: ssongliu Date: Thu, 20 Aug 2026 15:01:27 +0800 Subject: [PATCH] fix: sync documentation source settings (#13599) --- frontend/src/components/system-upgrade/index.vue | 2 +- frontend/src/store/modules/global.ts | 2 +- frontend/src/views/setting/about/index.vue | 2 +- frontend/src/views/setting/panel/index.vue | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/system-upgrade/index.vue b/frontend/src/components/system-upgrade/index.vue index 883f091aa..cb4a6bec7 100644 --- a/frontend/src/components/system-upgrade/index.vue +++ b/frontend/src/components/system-upgrade/index.vue @@ -106,7 +106,7 @@ const to1Panel = () => { }; const toDoc = () => { - window.open(docsUrl.value, '_blank', 'noopener,noreferrer'); + window.open(docsUrl.value.endsWith('/') ? docsUrl.value : `${docsUrl.value}/`, '_blank', 'noopener,noreferrer'); }; const toEdition = () => { diff --git a/frontend/src/store/modules/global.ts b/frontend/src/store/modules/global.ts index 8003d8255..26fca7421 100644 --- a/frontend/src/store/modules/global.ts +++ b/frontend/src/store/modules/global.ts @@ -8,7 +8,7 @@ import { isMasterOnlyPermissionCode, setMasterOnlyPermissionCodes, toManageCode import { clearPageStateCache } from '@/utils/page-state-cache'; const CN_DOCS_URL = 'https://1panel.cn/docs/v2'; -const INTL_DOCS_URL = 'https://docs.1panel.pro/v2'; +const INTL_DOCS_URL = 'https://1panel.pro/docs/v2'; const GlobalStore = defineStore('GlobalState', { state: (): GlobalState => ({ diff --git a/frontend/src/views/setting/about/index.vue b/frontend/src/views/setting/about/index.vue index 4f4f5d6ff..089a7f285 100644 --- a/frontend/src/views/setting/about/index.vue +++ b/frontend/src/views/setting/about/index.vue @@ -52,7 +52,7 @@ const loading = ref(); const logoLoadFailed = ref(false); const toDoc = () => { - window.open(docsUrl.value, '_blank', 'noopener,noreferrer'); + window.open(docsUrl.value.endsWith('/') ? docsUrl.value : `${docsUrl.value}/`, '_blank', 'noopener,noreferrer'); }; const toGithub = () => { window.open('https://github.com/1Panel-dev/1Panel', '_blank', 'noopener,noreferrer'); diff --git a/frontend/src/views/setting/panel/index.vue b/frontend/src/views/setting/panel/index.vue index 697f6e501..a0cbcfae4 100644 --- a/frontend/src/views/setting/panel/index.vue +++ b/frontend/src/views/setting/panel/index.vue @@ -213,6 +213,7 @@ import { codeEditorThemeStorageKey } from '@/utils/code-editor-theme'; import i18n from '@/lang'; const { + docWithRegion, globalStore, isEnterprise, isIntl, @@ -310,6 +311,8 @@ const search = async () => { form.sessionTimeout = Number(res.data.sessionTimeout || 0); form.docSource = res.data.docSource || 'withByRegion'; form.edition = res.data.edition; + docWithRegion.value = form.docSource === 'withByRegion'; + isIntl.value = form.edition === 'intl'; form.proxyUrl = res.data.proxyUrl; form.proxyType = res.data.proxyType;