This commit is contained in:
Liang Ding 2022-10-28 09:19:57 +08:00
parent 0bc997051e
commit cfb13f3b74
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
11 changed files with 14 additions and 14 deletions

View file

@ -100,7 +100,7 @@
return new Promise(resolve => setTimeout(resolve, ms))
}
const redirect = () => {
const uri = 'http://siyuan.localhost:' + location.port
const uri = 'http://localhost:' + 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://siyuan.localhost:' + location.port + '/api/system/bootProgress')
const progressResult = await fetch('http://localhost:' + 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

View file

@ -43,7 +43,7 @@ let siyuanOpenURL
let firstOpen = false
let resetWindowStateOnRestart = false
let kernelPort = "6806"
const localhost = "siyuan.localhost"
const localhost = "localhost"
require('@electron/remote/main').initialize()
if (!app.requestSingleInstanceLock()) {

View file

@ -75,7 +75,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": "siyuan.localhost"
"TextMarkTextContent": "localhost"
},
{
"Type": "NodeText",

View file

@ -76,7 +76,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": "127.0.0.1"
"TextMarkTextContent": "localhost"
},
{
"Type": "NodeText",

View file

@ -75,7 +75,7 @@
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": "siyuan.localhost"
"TextMarkTextContent": "localhost"
},
{
"Type": "NodeText",

View file

@ -40,7 +40,7 @@
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-L7WEXVQCR9');
gtag('config', 'G-L7WEXVQCR9',{ 'debug_mode':true });
</script>
</body>
</html>

View file

@ -55,7 +55,7 @@ export const about = {
<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] : "siyuan.localhost"}:${location.port}" 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] : "localhost"}:${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>

View file

@ -177,7 +177,7 @@ ${accountHTML}
closePanel();
if (!window.siyuan.config.localIPs || window.siyuan.config.localIPs.length === 0 ||
(window.siyuan.config.localIPs.length === 1 && window.siyuan.config.localIPs[0] === "")) {
window.siyuan.config.localIPs = ["siyuan.localhost"];
window.siyuan.config.localIPs = ["localhost"];
}
modelElement.style.top = "0";
modelElement.querySelector(".toolbar__icon").innerHTML = '<use xlink:href="#iconInfo"></use>';
@ -193,7 +193,7 @@ ${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] : "siyuan.localhost"}:${location.port}">
<input class="b3-text-field fn__block" readonly value="http://${window.siyuan.config.system.networkServe ? window.siyuan.config.localIPs[0] : "localhost"}:${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>

View file

@ -387,7 +387,7 @@
<div class="b3-snackbar__content"></div>
</div>
<script>
if (location.hostname !== 'siyuan.localhost' && location.hostname !== '127.0.0.1') {
if (location.hostname !== 'localhost' && location.hostname !== '127.0.0.1') {
document.querySelector('.b3-button--white').remove()
}

View file

@ -103,7 +103,7 @@ func Serve(fastMode bool) {
rewritePortJSON(pid, port)
}
logging.LogInfof("kernel [pid=%s] is booting [%s]", pid, "http://"+host+":"+port)
logging.LogInfof("kernel [pid=%s] is booting [%s]", pid, "http://"+util.LocalHost+":"+port)
util.HttpServing = true
go func() {

View file

@ -295,7 +295,7 @@ const (
ContainerAndroid = "android" // Android 端
ContainerIOS = "ios" // iOS 端
LocalHost = "siyuan.localhost" // 本地域名,由操作系统自动解析到 127.0.0.1
LocalHost = "localhost" // 本地域名,由操作系统自动解析到 127.0.0.1
FixedPort = "6806" // 固定端口
)