-
Notifications
You must be signed in to change notification settings - Fork 573
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
[Plugin] styled-bars #201
[Plugin] styled-bars #201
Conversation
Add UI Control to windows taskbar preview
using win.minimize() and win.setSkipTaskbar(bool) instead of win.hide() / win.show()
instead of changing source code
(was deleted by accident)
…into styled-bars
* Added Discord timeout * Add getOptions in plugin util * Mutex in ffmpeg conversion (only supports one command at a time) * Add menu customization in plugin system * Add ytpl package (playlist info) * Handle ffmpeg metadata flags when metadata is not present * Only use artist in file name if present * Export sendError method * Handle image not present in metadata util * Add downloader utils (getFolder and default menu label) * Pass (optional) existing metadata and subfolder in mp3 converter * Add listener to download playlist * Add custom menu in downloader plugin ("download playlist" item) * nit: fix main CSS style * Only set the "enable" item in menu if plugin not enabled * Navigation plugin: inject HTML once CSS is loaded Co-authored-by: Sem Visscher <semvisscher10@gmail.com> Co-authored-by: TC <th-ch@users.noreply.github.com>
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.
Thanks for the contribution, love the idea! 🤩
Left a few comments (main one is about re-using the existing menu to avoid duplicating code, otherwise it will make maintenance of the code harder - also, IMHO styled-bars
feels a bit unclear as plugin name, I would have gone with something explicit like in-app-menu
) - I am fine with merging it as it is and make the follow ups, or you can update the PR if you feel like it! It's up to you, in both cases this contribution is already awesome 👍
Note: it does not work for me on MacOS but it might be the same issue as AlexTorresDev/custom-electron-titlebar#145 (from the package)
instead it modifies the original menu
You are welcome to change the name to whatever you like :) It was tested only on windows but from what i've seen - mac users can use their own special titlebar ;) About the comments on the code
Also is it ok if I integrate a folder chooser for the (to plugins/downloader/menu.js) |
09d2feb added to the main menu a change that I originally had in my copied template : ea3d198 remove the new exit button, and also - the view menu from tray which didn't work and was redundant. this hasn't got much to do with the plugin, you can disregard those commits if you really want 😝 |
also delete useless nonfunctional view submenu
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.
Looks good, thanks for the contribution! ✅
Just a comment about generating the menu with options (instead of deleting parts of it later) to reduce the risk of breaking changes, but no blocker, I will tackle that in a follow up 👍
Will also rename the plugin to in-app-menu
for clarity (but open to alternative names)
} | ||
|
||
//custom menu doesn't support roles, so they get injected manually | ||
function fixRoles(MenuItem) { |
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.
Note: we could add options (like noRoles
) to the mainMenuTemplate
to reduce risks of breaking changes in the menu.
// delete quit button from navigation submenu | ||
let navigation = getIndex(template,'Navigation'); | ||
let quit = getIndex(template[navigation].submenu,'Quit App'); | ||
delete template[navigation].submenu[quit]; |
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.
Same note: we could have options to return a "tray specific menu" in mainMenuTemplate
I got bored of the old bars :)
This plugin changes the Titlebar, main menu, and scrollbar
If Hide Menu option is active - Menu can be toggled on/off when pressing
Escape
keyPictures:
With menu on::
With menu off:
Files changed:
youtube-music/index.js
Line 102 in 5218b80
youtube-music/package.json
Line 70 in 5218b80
youtube-music/yarn.lock
Lines 2632 to 2635 in 5218b80
I could add settings to change colors etc, if anyone's interested..