Skip to content

Build your personal knowledge base with Trilium Notes

feat(tray): use checkbox for show windows and move to top

Elian Doran4bd9d32c74c5
diff --git a/src/services/tray.ts b/src/services/tray.ts
index 95962ae0ee..600898bdfe 100644
--- a/src/services/tray.ts
+++ b/src/services/tray.ts
@@ -111,7 +111,21 @@ function updateTrayMenu() {
const contextMenu = Menu.buildFromTemplate([
{
- label: "New Note",
+ label: "Show windows",
+ type: "checkbox",
+ checked: isVisible,
+ click: () => {
+ if (isVisible) {
+ mainWindow.hide();
+ } else {
+ mainWindow.show();
+ mainWindow.focus();
+ }
+ }
+ },
+ { type: "separator" },
+ {
+ label: "New note",
type: "normal",
click: () => triggerKeyboardAction("createNoteIntoInbox")
},
@@ -132,20 +146,7 @@ function updateTrayMenu() {
},
{ type: "separator" },
{
- label: isVisible ? "Hide" : "Show",
- type: "normal",
- click: () => {
- if (isVisible) {
- mainWindow.hide();
- } else {
- mainWindow.show();
- mainWindow.focus();
- }
- }
- },
- { type: "separator" },
- {
- label: "Quit",
+ label: "Quit Trilium",
type: "normal",
click: () => {
mainWindow.close();