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

@ -1024,3 +1024,11 @@ powerMonitor.on("shutdown", () => {
net.fetch(getServer(currentURL.port) + "/api/system/exit", {method: "POST"});
});
});
powerMonitor.on("lock-screen", () => {
writeLog("system lock-screen");
BrowserWindow.getAllWindows().forEach(item => {
item.webContents.send("siyuan-send_windows", {cmd: "lockscreenByMode"});
});
});