mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
This PR introduces new window behaviors, which can be enabled when the menubar setting is active: New Features: - Quick open from tray icon - Minimize to tray - Exit to tray - Start minimized These changes have not yet been tested on macOS. <img width="645" height="479" alt="image" src="https://github.com/user-attachments/assets/7bdd13d0-5322-45a4-8e71-85c081aa0c86" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Configurable menubar/tray behaviors: open on left-click, minimize to tray, close to tray (exit to tray), and start minimized. * **UI** * Appearance settings add a Menubar → Window Behavior group with four toggles; group shows only when menubar/tray is enabled (hidden on macOS). * **Settings** * Tray settings persisted and exposed via the settings API with getters and setters for each option. * **Localization** * Added translation keys and English strings for the new controls and descriptions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Peng Xiao <pengxiao@outlook.com>
AFFiNE Electron App
Development
To run AFFiNE Desktop Client Application locally, run the following commands:
# in repo root
yarn install
yarn affine @affine/native build
yarn dev
# in packages/frontend/apps/electron
yarn generate-assets
yarn dev # or yarn prod for production build
Troubleshooting
If you have trouble building electron during yarn install, try setting mirror environment variable:
export ELECTRON_MIRROR="https://registry.npmmirror.com/-/binary/electron/"
Credits
Most of the boilerplate code is generously borrowed from the following