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/9087

Vanessa9333f52edd5a
diff --git a/app/src/config/about.ts b/app/src/config/about.ts
index 2ee82ca3af..c141fdd7bf 100644
--- a/app/src/config/about.ts
+++ b/app/src/config/about.ts
@@ -67,13 +67,13 @@ export const about = {
<svg><use xlink:href="#iconLock"></use></svg>${window.siyuan.languages.config}
</button>
</label>
- <label class="b3-label fn__flex${window.siyuan.config.accessAuthCode ? "" : " fn__none"}">
+ <label class="b3-label fn__flex${!window.siyuan.config.accessAuthCode || isBrowser() ? " fn__none" : ""}">
<div class="fn__flex-1">
${window.siyuan.languages.about7}
<div class="b3-label__text">${window.siyuan.languages.about8}</div>
</div>
<div class="fn__space"></div>
- <input class="b3-switch fn__flex-center" id="lockScreenMode" type="checkbox"${window.siyuan.config.system.lockScreenMode === 0 ? " checked" : ""}>
+ <input class="b3-switch fn__flex-center" id="lockScreenMode" type="checkbox"${window.siyuan.config.system.lockScreenMode === 1 ? " checked" : ""}>
</label>
</div>
<label class="b3-label config__item${isBrowser() ? " fn__none" : " fn__flex"}">
@@ -310,6 +310,10 @@ export const about = {
});
});
});
+ const lockScreenModeElement = about.element.querySelector("#lockScreenMode") as HTMLInputElement;
+ lockScreenModeElement.addEventListener("change", () => {
+ fetchPost("/api/system/setFollowSystemLockScreen", {lockScreenMode: lockScreenModeElement.checked ? 1 : 0});
+ });
const googleAnalyticsElement = about.element.querySelector("#googleAnalytics") as HTMLInputElement;
googleAnalyticsElement.addEventListener("change", () => {
fetchPost("/api/system/setGoogleAnalytics", {googleAnalytics: googleAnalyticsElement.checked}, () => {