fix(tray): resolve IPC notification and icon display issues#1095
fix(tray): resolve IPC notification and icon display issues#1095kuishou68 merged 2 commits intoiOfficeAI:mainfrom
Conversation
|
@cdxiaodong Nice work on the close-to-tray feature! The dual-layer IPC approach and platform-specific icon handling look well thought out. Before merging, please:
Will merge once rebased and tested. Thanks! |
ed477d7 to
f603f9a
Compare
|
Rebased onto latest Ready for review & merge. |
|
@cdxiaodong 功能方向没问题,close to tray 是常见需求。几个地方需要调整: 1. 去掉 direct IPC,只用 bridge现在同时有 2. bridge provider 里做持久化
3. macOS 不要隐藏 Dock 图标最小化到托盘时 4. 清理 console.log6 处 5. 需要 rebase当前和 main 有冲突,rebase 一下。 以上改完就可以合了。 |
Add system tray support with configurable close-to-tray behavior. When enabled, closing the window minimizes to tray instead of quitting. - Add Tray creation with context menu (Show/Quit) - Intercept window close event to hide instead of quit - Add IPC bridge for close-to-tray setting read/write - Add toggle switch in System Settings page - Add i18n translations for all 6 supported languages
- Remove direct IPC (ipcMain.handle), use bridge system only - Add ConfigStorage.set to bridge provider for persistence - Remove macOS dock.hide() to keep Dock icon visible - Clean up console.log statements (keep only error logs)
f603f9a to
9ec4804
Compare

Summary
ipcMain.handleinindex.tsto bypass the bridge library, with bridge as fallback.icon.png(Template image without proper black/transparent format) toapp.png(colored app icon) resized to 16x16.ConfigStoragedirectly for reading/writing the close-to-tray setting, and notifies main process via direct IPC (window.electronAPI.setCloseToTray).Closes #1072
Test plan