Skip to content

feat: 新增「通用设置 > 应用设置 > 显示托盘图标」配置项#910

Merged
ayangweb merged 1 commit intomasterfrom
show-tray-icon
Apr 14, 2026
Merged

feat: 新增「通用设置 > 应用设置 > 显示托盘图标」配置项#910
ayangweb merged 1 commit intomasterfrom
show-tray-icon

Conversation

@ayangweb
Copy link
Copy Markdown
Owner

resolved #851

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.trayVisible state with a default of true, and exposed it via a new Switch in the General preferences UI.
  • Updated the tray composable to reflect trayVisible at runtime by calling TrayIcon.setVisible(...).
  • Refactored shared menu construction into useAppMenu and 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.

Comment thread src/pages/main/index.vue
@ayangweb ayangweb merged commit cdfd0b6 into master Apr 14, 2026
4 checks passed
@ayangweb ayangweb deleted the show-tray-icon branch April 14, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] add a hide from system tray option in the APP settings

2 participants