fix: sync documentation source settings (#13599)

This commit is contained in:
ssongliu
2026-08-20 15:01:27 +08:00
committed by GitHub
parent 7ec0bdb3f7
commit a04875f64b
4 changed files with 6 additions and 3 deletions

View File

@@ -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 = () => {

View File

@@ -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 => ({

View File

@@ -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');

View File

@@ -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;