🎨 Windows/macOS 桌面端支持开机启动 https://github.com/siyuan-note/siyuan/issues/6833

This commit is contained in:
Liang Ding 2022-12-09 23:12:47 +08:00
parent 8da31e7b1c
commit 1b43384a1e
No known key found for this signature in database
GPG Key ID: 136F30F901A2231D

View File

@ -397,6 +397,7 @@ export const about = {
window.siyuan.config.system.downloadInstallPkg = downloadInstallPkgElement.checked;
});
});
/// #if !BROWSER
const autoLaunchElement = about.element.querySelector("#autoLaunch") as HTMLInputElement;
autoLaunchElement.addEventListener("change", () => {
fetchPost("/api/system/setAutoLaunch", {autoLaunch: autoLaunchElement.checked}, () => {
@ -404,6 +405,7 @@ export const about = {
app.setLoginItemSettings({openAtLogin: autoLaunchElement.checked});
});
});
/// #endif
about.element.querySelector("#aboutConfirm").addEventListener("click", () => {
const scheme = (about.element.querySelector("#aboutScheme") as HTMLInputElement).value;
const host = (about.element.querySelector("#aboutHost") as HTMLInputElement).value;