-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add systray #207
base: main
Are you sure you want to change the base?
feat: add systray #207
Conversation
Hello, Thank you for contributing to the project. After testing with your code, I found the following issues. (Tested on macOS 15.3 and Node.js 22)
Vutron is a project conceived as a template that is easy to get started with. The add-ons that can be implemented through Electron should be minimized or made optional. There needs to be a way to disable Tray by default and enable it with a flag or constant definition. (Also, documentation for this feature may be needed before it is merged.) Regards, |
Hi, I reached a better stage.
If you're ok with evolutions, I will add documentation. |
Hello, thank you for improving the code. The function is working as intended. If you fix the remaining few bugs and improve the code, I'd be happy to merge the code!
You can skip the document creation, or submit it separately as another PR. Regards, |
@@ -0,0 +1,129 @@ | |||
import { app, screen, Menu, Tray, BaseWindow, BrowserWindow } from 'electron' | |||
import Constants from './utils/Constants.ts' | |||
import { getDisplayNearestPoint } from './desktop.ts' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It says "ESLint: 'getDisplayNearestPoint' is defined but never used. (no-unused-vars)"
|
||
let tray; | ||
let trayOptions; | ||
const DEFAULT_OPTIONS = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you define main/utils/Constants.ts so that options.trayOptions in MainRunner.ts and DEFAULT_OPTIONS in tray.ts do not overlap, and then use only those values?
What did you change?
Add systray icon.
Why did you make the change?
For better OS integration
How does this work?
createTray(mainWindow) called into mainRunner