From a7a69241d94e86f0d8a961d30c4c740ac7bdc074 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 2 Mar 2026 19:43:21 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/17065 --- app/stage/auth.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/stage/auth.html b/app/stage/auth.html index 23cf53fd1..9b2228912 100644 --- a/app/stage/auth.html +++ b/app/stage/auth.html @@ -442,7 +442,16 @@ } } + const url = new URL(window.location) + toPath = url.searchParams.get("to") || "/" + const exitSiYuan = () => { + if (toPath.indexOf("/stage/build/app/window.html") > -1) { + const {ipcRenderer} = require('electron'); + ipcRenderer.send("siyuan-cmd", "destroy"); + return; + } + document.querySelector('#message').classList.add('b3-snackbar--show') document.querySelector('#message').firstElementChild.innerHTML = "{{.l8}}" try { @@ -511,8 +520,7 @@ return response.json() }).then((response) => { if (0 === response.code) { - const url = new URL(window.location) - window.location.href = url.searchParams.get("to") || "/" + window.location.href = toPath return } @@ -537,6 +545,8 @@ } if (window.location.hostname !== 'localhost' && window.location.hostname !== '127.0.0.1') { document.querySelector('.b3-button--white').remove() + } else if (toPath.indexOf("/stage/build/app/window.html") > -1) { + document.querySelector('.b3-button--white').textContent = "{{.l11}}" } try {