Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/6337

Vanessa98e59dc70096
diff --git a/app/appearance/boot/index.html b/app/appearance/boot/index.html
index ad8b513083..75569556d8 100644
--- a/app/appearance/boot/index.html
+++ b/app/appearance/boot/index.html
@@ -100,7 +100,7 @@
return new Promise(resolve => setTimeout(resolve, ms))
}
const redirect = () => {
- const uri = 'http://127.0.0.1:6806'
+ const uri = 'http://127.0.0.1:' + location.port
if (navigator.userAgent.match(/Android/i))
document.location = uri
else
@@ -113,7 +113,7 @@
let progressing = false
while (!progressing) {
try {
- const progressResult = await fetch('http://127.0.0.1:6806/api/system/bootProgress')
+ const progressResult = await fetch('http://127.0.0.1:' + location.port + '/api/system/bootProgress')
const progressData = await progressResult.json()
document.getElementById('progress').style.width = progressData.data.progress + '%'
document.getElementById('details').textContent = progressData.data.details
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json
index 8aa3ee9c52..a49d129ccc 100644
--- a/app/appearance/langs/en_US.json
+++ b/app/appearance/langs/en_US.json
@@ -686,7 +686,7 @@
"about": "About",
"about1": "Copyright (c) 2020-present • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/privacy.html'>Privacy Policy</a> • <a target='_blank' href='https://b3log.org/siyuan/eula.html'>User Agreement</a><div class='fn__hr'></div><div class='fn__hr'></div><div class='ft__on-surface'>The core developers of SiYuan are <a href=\"https://github.com/88250\" target=\"_blank\">D</a> and <a href=\"https://github.com/Vanessa219\" target=\"_blank\">V</a>, and the community development contributors can be seen <a href=\"https://github.com/siyuan-note/bazaar/graphs/contributors\" target=\"_blank\">here</a></div>",
"about2": "Use on browser",
- "about3": "Please use the Chrome browser and keep it in the same network as the computer, port <code class='fn__code'>6806</code>, the IP addresses that may be connected are as follows",
+ "about3": "Please use the Chrome browser and keep it in the same network as the computer, port <code class='fn__code'>${port}</code>, the IP addresses that may be connected are as follows",
"about4": "Open browser",
"about5": "Access Authorization Code",
"about6": "After configuration, it will be used as the access authentication password, leave it blank to close the authentication",
diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json
index 3dc61adb81..573dde8225 100644
--- a/app/appearance/langs/es_ES.json
+++ b/app/appearance/langs/es_ES.json
@@ -686,7 +686,7 @@
"about": "Acerca de",
"about1": "Copyright (c) 2020-presente • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/privacy.html'>Política de privacidad</a> • <a target='_blank' href='https://b3log.org/siyuan/eula.html'>Acuerdo de usuario</a><div class='fn__hr'></div><div class='fn__hr'></div><div class='ft__on-surface'>Los principales desarrolladores de SiYuan son <a href=\"https://github.com/88250\" target=\"_blank\">D</a> y <a href=\"https://github.com/Vanessa219\" target=\"_blank\">V</a>, y los contribuyentes al desarrollo de la comunidad pueden verse <a href=\"https://github.com/siyuan-note/bazaar/graphs/contributors\" target=\"_blank\">aquí</a></div>",
"about2": "Uso en el navegador",
- "about3": "Por favor, utilice el navegador Chrome y manténgalo en la misma red que el ordenador, puerto <code class='fn__code'>6806</code>, las direcciones IP que pueden conectarse son las siguientes",
+ "about3": "Por favor, utilice el navegador Chrome y manténgalo en la misma red que el ordenador, puerto <code class='fn__code'>${port}</code>, las direcciones IP que pueden conectarse son las siguientes",
"about4": "Abrir el navegador",
"about5": "Código de autorización de acceso",
"about6": "Después de la configuración, se utilizará como contraseña de autenticación de acceso, déjelo en blanco para cerrar la autenticación",
diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json
index 6e4e8f50a4..66122a1c38 100644
--- a/app/appearance/langs/fr_FR.json
+++ b/app/appearance/langs/fr_FR.json
@@ -686,7 +686,7 @@
"about": "À propos de",
"about1": "Copyright (c) 2020-présent • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/privacy.html'>Politique de confidentialité</a> • <a target='_blank' href='https://b3log.org/siyuan/eula.html'>Accord de l'utilisateur</a><div class='fn__hr'></div><div class='fn__hr'></div><div class='ft__on-surface'>Les principaux développeurs de SiYuan sont <a href=\"https://github.com/88250\" target=\"_blank\">D</a> et <a href=\"https://github.com/Vanessa219\" target=\"_blank\">V</a>, et les contributeurs au développement de la communauté peuvent être vus <a href=\"https://github.com/siyuan-note/bazaar/graphs/contributors\" target=\"_blank\">ici</a></div>",
"about2": "Utiliser sur le navigateur",
- "about3": "Veuillez utiliser le navigateur Chrome et le garder sur le même réseau que l'ordinateur, port <code class='fn__code'>6806</code>, les adresses IP pouvant être connectées sont les suivantes",
+ "about3": "Veuillez utiliser le navigateur Chrome et le garder sur le même réseau que l'ordinateur, port <code class='fn__code'>${port}</code>, les adresses IP pouvant être connectées sont les suivantes",
"about4": "Ouvrir le navigateur",
"about5": "Accès Code d'autorisation",
"about6": "Configuré comme mot de passe d'authentification d'accès, laisser vide pour désactiver l'authentification.",
diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json
index b6085f576c..320a6e04e3 100644
--- a/app/appearance/langs/zh_CHT.json
+++ b/app/appearance/langs/zh_CHT.json
@@ -686,7 +686,7 @@
"about": "關於",
"about1": "版權所有 (c) 2020-現在 • 雲南鏈滴科技有限公司 • <a target='_blank' href='https://b3log.org/siyuan/privacy.html'>隱私政策</a> • <a target='_blank' href='https://b3log.org/siyuan/eula.html'>用戶協議</a><div class='fn__hr'></div><div class='fn__hr'></div><div class='ft__on-surface'>思源筆記的核心開發者是 <a href=\"https://github.com/88250\" target=\"_blank\">D</a> 和 <a href=\"https://github.com/Vanessa219\" target=\"_blank\">V</a>,社區開發貢獻者可在<a href=\"https://github.com/siyuan-note/bazaar/graphs/contributors\" target=\"_blank\">這裡</a>看到</div>",
"about2": "在瀏覽器上使用",
- "about3": "請使用 Chrome 瀏覽器並保持和電腦在同一個網路內,端口 <code class='fn__code'>6806</code>,可能連通的 IP 地址如下",
+ "about3": "請使用 Chrome 瀏覽器並保持和電腦在同一個網路內,端口 <code class='fn__code'>${port}</code>,可能連通的 IP 地址如下",
"about4": "打開瀏覽器",
"about5": "存取授權碼",
"about6": "配置後作為存取鑒權密碼,留空則關閉鑒權",
diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json
index 7ffeb8cd5c..79ba28e529 100644
--- a/app/appearance/langs/zh_CN.json
+++ b/app/appearance/langs/zh_CN.json
@@ -686,7 +686,7 @@
"about": "关于",
"about1": "版权所有 (c) 2020-现在 • 云南链滴科技有限公司 • <a target='_blank' href='https://b3log.org/siyuan/privacy.html'>隐私政策</a> • <a target='_blank' href='https://b3log.org/siyuan/eula.html'>用户协议</a><div class='fn__hr'></div><div class='fn__hr'></div><div class='ft__on-surface'>思源笔记的核心开发者是 <a href=\"https://ld246.com/member/88250\" target=\"_blank\">D</a> 和 <a href=\"https://ld246.com/member/Vanessa\" target=\"_blank\">V</a>,社区开发贡献者可在<a href=\"https://github.com/siyuan-note/bazaar/graphs/contributors\" target=\"_blank\">这里</a>看到</div>",
"about2": "在浏览器上使用",
- "about3": "请使用 Chrome 浏览器并保持和电脑在同一个网络内,端口 <code class='fn__code'>6806</code>,可能连通的 IP 地址:",
+ "about3": "请使用 Chrome 浏览器并保持和电脑在同一个网络内,端口 <code class='fn__code'>${port}</code>,可能连通的 IP 地址:",
"about4": "打开浏览器",
"about5": "访问授权码",
"about6": "配置后作为访问鉴权密码,留空则关闭鉴权",
diff --git a/app/src/config/about.ts b/app/src/config/about.ts
index 750eae811a..bf83508799 100644
--- a/app/src/config/about.ts
+++ b/app/src/config/about.ts
@@ -43,11 +43,11 @@ export const about = {
<label class="b3-label${isBrowser() ? " fn__none" : " fn__flex"}">
<div class="fn__flex-1">
${window.siyuan.languages.about2}
- <div class="b3-label__text">${window.siyuan.languages.about3}</div>
+ <div class="b3-label__text">${window.siyuan.languages.about3.replace("${port}", location.port)}</div>
<span class="b3-label__text"><code class="fn__code">${window.siyuan.config.localIPs.join("</code> <code class='fn__code'>")}</code></span>
</div>
<div class="fn__space"></div>
- <button data-type="open" data-url="http://${window.siyuan.config.system.networkServe ? window.siyuan.config.localIPs[0] : "127.0.0.1"}:6806" class="b3-button b3-button--outline fn__size200 fn__flex-center">
+ <button data-type="open" data-url="http://${window.siyuan.config.system.networkServe ? window.siyuan.config.localIPs[0] : "127.0.0.1"}:${location.port}" class="b3-button b3-button--outline fn__size200 fn__flex-center">
<svg><use xlink:href="#iconLink"></use></svg>${window.siyuan.languages.about4}
</button>
</label>
diff --git a/app/src/mobile/util/menu.ts b/app/src/mobile/util/menu.ts
index f247f93c51..df20a55ccb 100644
--- a/app/src/mobile/util/menu.ts
+++ b/app/src/mobile/util/menu.ts
@@ -193,8 +193,8 @@ ${accountHTML}
<div class="b3-label">
${window.siyuan.languages.about2}
<div class="fn__hr"></div>
- <input class="b3-text-field fn__block" readonly value="http://${window.siyuan.config.system.networkServe ? window.siyuan.config.localIPs[0] : "127.0.0.1"}:6806">
- <div class="b3-label__text">${window.siyuan.languages.about3}</div>
+ <input class="b3-text-field fn__block" readonly value="http://${window.siyuan.config.system.networkServe ? window.siyuan.config.localIPs[0] : "127.0.0.1"}:${location.port}">
+ <div class="b3-label__text">${window.siyuan.languages.about3.replace("${port}", location.port)}</div>
<div class="fn__hr"></div>
<span class="b3-label__text"><code class="fn__code">${window.siyuan.config.localIPs.join("</code> <code class='fn__code'>")}</code></span>
</div>