feat: add customizable tray menu with template-based display#96
Open
Serdnaley wants to merge 1 commit intosolidtime-io:mainfrom
Open
feat: add customizable tray menu with template-based display#96Serdnaley wants to merge 1 commit intosolidtime-io:mainfrom
Serdnaley wants to merge 1 commit intosolidtime-io:mainfrom
Conversation
Replace the simple timer-only tray title with a canvas-rendered display
that supports configurable templates with placeholders for time, project
name (with color), task, and description.
- Add @napi-rs/canvas for native tray icon + text compositing
- Add trayTemplate setting with configurable placeholders:
{hours}, {minutes}, {seconds}, {project}, {project_colored},
{description}, {task}
- Pass project/task info from renderer to main process via IPC
- Add live preview and template editor in Settings page
- Support dark/light mode with proper text colors
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.
Summary
Adds a colored project and template of the tray menu in settings. Still not validated on all platforms and a bit risky to merge it yet I guess, but may be someone can help me checking it on other OS and leave some feedback so I can adjust it for the main version.
@napi-rs/canvasfor native tray icon + text compositing, enabling colored project names directly in the menu bar / system traytrayTemplatesetting with placeholders:{hours},{minutes},{seconds},{project},{project_colored},{description},{task}Changes
src/main/tray.tssrc/main/settings.tstrayTemplatesetting with persistencesrc/renderer/src/pages/SettingsPage.vuesrc/renderer/src/components/MainTimeEntryTable.vuesrc/renderer/src/utils/settings.tstrayTemplatebindingsrc/preload/main.ts,src/preload/interface.d.tsupdateTrayTemplateIPC channelsrc/renderer/src/utils/tray.tspackage.json@napi-rs/canvasdependencyScreenshots
The tray now renders like:
🕐 01:23:45 – Project Namewith the project name in its assigned color.(Will add actual screenshots if requested)
Test plan