feat: 添加系统托盘图标,关闭主窗口时隐藏到托盘而非退出;修复进程无法完全关闭问题(before-quit 加兜底强制退出 + wcdbService.shutdown 改为 async)

This commit is contained in:
hicccc77
2026-03-14 22:51:24 +08:00
parent 641abc57b9
commit ba5f8928f7
2 changed files with 70 additions and 6 deletions

View File

@@ -174,10 +174,10 @@ export class WcdbService {
/**
* 关闭服务
*/
shutdown(): void {
this.close()
async shutdown(): Promise<void> {
try { await this.close() } catch {}
if (this.worker) {
this.worker.terminate()
try { await this.worker.terminate() } catch {}
this.worker = null
}
}