fix: enable weekly storage cleanup
Desktop Client Build / Resolve Build Metadata (push) Successful in 32s
Frontend CI / Frontend (push) Successful in 2m6s
Backend CI / Backend (push) Successful in 16m11s
Desktop Client Build / Build Desktop Client (push) Successful in 23m50s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 37s

This commit is contained in:
2026-06-19 21:11:14 +08:00
parent a48f450de6
commit f26802c76e
8 changed files with 125 additions and 17 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
import { nativeImage } from 'electron/common'
import type { Tray as ElectronTray } from 'electron/main'
import { Menu, Tray, app } from 'electron/main'
import { Menu, Tray } from 'electron/main'
import { TRAY_DANGER_ICON_BASE64, TRAY_ICON_BASE64, TRAY_WINDOWS_ICON_BASE64 } from './brand-icons'
@@ -84,7 +84,7 @@ export function updateTrayIssueIndicator(issueCount: number): void {
tray.setToolTip(hasIssues ? `省心推 · ${safeCount} 个账号健康问题` : '省心推')
}
export function initTray(onOpen: () => void): ElectronTray {
export function initTray(onOpen: () => void, onQuit: () => void): ElectronTray {
if (tray) {
return tray
}
@@ -95,7 +95,7 @@ export function initTray(onOpen: () => void): ElectronTray {
Menu.buildFromTemplate([
{ label: '打开省心推', click: () => onOpen() },
{ type: 'separator' },
{ label: '退出省心推', click: () => app.quit() },
{ label: '退出省心推', click: () => onQuit() },
]),
)
tray.on('click', () => onOpen())