Skip to content

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

:art: Improve lock screen interaction https://github.com/siyuan-note/siyuan/issues/17065

Danielb77580c86e20
diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.ts
index 23a1de1a4d..0c4ba697a4 100644
--- a/app/src/util/pathName.ts
+++ b/app/src/util/pathName.ts
@@ -10,14 +10,12 @@ import {Constants} from "../constants";
import {ipcRenderer} from "electron";
/// #endif
/// #if !MOBILE
-import {exportLayout} from "../layout/util";
/// #endif
import {showMessage} from "../dialog/message";
import {isOnlyMeta, isWindows, setStorageVal, updateHotkeyTip} from "../protyle/util/compatibility";
import {matchHotKey} from "../protyle/util/hotKey";
import {Menu} from "../plugin/Menu";
import {hasClosestByClassName} from "../protyle/util/hasClosest";
-import {saveScroll} from "../protyle/scroll/saveScroll";
export const useShell = (cmd: "showItemInFolder" | "openPath", filePath: string) => {
/// #if !BROWSER
@@ -65,6 +63,10 @@ export const getIdFromSYProtocol = (url: string) => {
/* redirect to auth page */
export const redirectToCheckAuth = async (to: string = window.location.href) => {
+ if (window.siyuan.config.readonly || window.siyuan.isPublish) {
+ return;
+ }
+
const url = new URL(window.location.origin);
url.pathname = "/check-auth";
url.searchParams.set("to", to);