Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements issue #851 by adding a new “Show Tray Icon” preference under General → Application Settings, allowing users to toggle whether the app’s system tray icon is visible.
Changes:
- Added
generalStore.app.trayVisiblestate with a default oftrue, and exposed it via a new Switch in the General preferences UI. - Updated the tray composable to reflect
trayVisibleat runtime by callingTrayIcon.setVisible(...). - Refactored shared menu construction into
useAppMenuand reused its “exit” items in both tray menu and main window context menu.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/stores/general.ts | Adds persisted app setting trayVisible with default true. |
| src/pages/preference/index.vue | Initializes tray behavior via useTray() without exposing/using createTray. |
| src/pages/preference/components/general/index.vue | Adds the “Show Tray Icon” switch bound to generalStore.app.trayVisible. |
| src/pages/main/index.vue | Switches to useAppMenu and adds exit items to the main context menu. |
| src/composables/useTray.ts | Uses trayVisible watcher to hide/show tray icon; uses useAppMenu for menu items. |
| src/composables/useAppMenu.ts | Renames/refactors shared menu to useAppMenu, adds reusable restart/quit menu items. |
| src/locales/en-US.json | Adds strings for tray toggle and moves restart/quit labels under useAppMenu. |
| src/locales/zh-CN.json | Same localization updates as en-US. |
| src/locales/zh-TW.json | Same localization updates as en-US. |
| src/locales/vi-VN.json | Same localization updates as en-US. |
| src/locales/pt-BR.json | Same localization updates as en-US. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolved #851