- DEFAULTS.startup.openAtLogin 与随包 config.json 默认改为 false;
applyOpenAtLogin 只有显式 true 才注册登录项(缺省/null/false 都不注册)
- config.js 新增 updateConfig():只写回文件里已有的键 + 目标键,不把 DEFAULTS 落盘
- 主进程 setOpenAtLogin():改内存 → 写回 config.json → setLoginItemSettings,
任一失败都回滚,返回 {ok, openAtLogin};状态快照新增 openAtLogin / openAtLoginSupported
- 渲染层:服务端状态卡片新增「开机自启」滑块(纯 CSS,无依赖),
切换即时生效并有本地意图守卫,避免被随后到达的陈旧快照冲掉
- 文档:console/README.md 与 docs/部署指南.md 同步
注意:旧包 config.json 里已显式写 true 的用户升级后仍会自启(不悄悄改既有行为),
在窗口里关一次即可;全新安装默认不注册。
39 lines
829 B
JSON
39 lines
829 B
JSON
{
|
|
"server": {
|
|
"exe": "scoreboard.exe",
|
|
"args": ["-config", "config.yaml"],
|
|
"host": "127.0.0.1",
|
|
"port": 19540,
|
|
"autoStart": true,
|
|
"healthIntervalMs": 5000,
|
|
"restartDelayMs": 3000,
|
|
"maxRestarts": 0,
|
|
"shutdownPath": "/api/shutdown",
|
|
"shutdownTimeoutMs": 5000,
|
|
"healthyResetMs": 60000
|
|
},
|
|
"display": {
|
|
"selection": "all-secondary",
|
|
"displays": [],
|
|
"pages": ["standings", "medals", "individual", "results"],
|
|
"pageParam": "page",
|
|
"kiosk": true,
|
|
"ignoreMouse": true,
|
|
"reloadEveryHours": 24,
|
|
"waitForServerMs": 20000,
|
|
"backgroundColor": "#0b0f1a"
|
|
},
|
|
"startup": {
|
|
"openAtLogin": false
|
|
},
|
|
"admin": {
|
|
"width": 1040,
|
|
"height": 760
|
|
},
|
|
"log": {
|
|
"maxLines": 2000,
|
|
"file": "logs/console.log",
|
|
"maxFileBytes": 4194304
|
|
}
|
|
}
|