This commit is contained in:
Vanessa 2023-09-04 10:06:15 +08:00
parent 9333f52edd
commit 225dfbf505
4 changed files with 26 additions and 2 deletions

View file

@ -312,7 +312,9 @@ export const about = {
});
const lockScreenModeElement = about.element.querySelector("#lockScreenMode") as HTMLInputElement;
lockScreenModeElement.addEventListener("change", () => {
fetchPost("/api/system/setFollowSystemLockScreen", {lockScreenMode: lockScreenModeElement.checked ? 1 : 0});
fetchPost("/api/system/setFollowSystemLockScreen", {lockScreenMode: lockScreenModeElement.checked ? 1 : 0}, () => {
window.siyuan.config.system.lockScreenMode = lockScreenModeElement.checked ? 1 : 0;
});
});
const googleAnalyticsElement = about.element.querySelector("#googleAnalytics") as HTMLInputElement;
googleAnalyticsElement.addEventListener("change", () => {