From 30af8ca096913e4d73e414bca7c2b0eaf0a73079 Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Fri, 3 Jul 2026 12:07:03 -0700 Subject: [PATCH] =?UTF-8?q?ac-electron:=20drop=20the=20calendar=20tray=20i?= =?UTF-8?q?con=20=E2=80=94=20DateWizard=20owns=20the=20menu-bar=20calendar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ac-electron/main.js | 49 +-------------------------------------------- 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/ac-electron/main.js b/ac-electron/main.js index 3060d2f9a4..54fe262985 100644 --- a/ac-electron/main.js +++ b/ac-electron/main.js @@ -1179,7 +1179,6 @@ function broadcastCredentialsChanged() { // ========== System Tray ========== let tray = null; let notepatTray = null; -let calendarTray = null; let trayContextMenu = null; // Stored so macOS left-click can pop it explicitly. // Parse the macOS/Windows accent color into {r,g,b}. Returns null when the @@ -1548,52 +1547,6 @@ function createNotepatTray() { notepatTray.setContextMenu(menu); } -function createCalendarTray() { - if (calendarTray) return; - - let iconPath; - if (process.platform === 'darwin') { - iconPath = app.isPackaged - ? path.join(process.resourcesPath, 'calendarTrayTemplate.png') - : path.join(__dirname, 'build', 'icons', 'calendarTrayTemplate.png'); - } else { - iconPath = app.isPackaged - ? path.join(process.resourcesPath, 'calendarTrayTemplate.png') - : path.join(__dirname, 'build', 'icons', 'calendarTrayTemplate.png'); - } - - const icon = nativeImage.createFromPath(iconPath); - if (icon.isEmpty()) { - console.warn('[calendar-tray] Icon empty at', iconPath); - return; - } - if (process.platform === 'darwin') icon.setTemplateImage(true); - - calendarTray = new Tray(icon); - calendarTray.setToolTip('Calendar'); - - const open = () => navigateToPiece('cal'); - - const menu = Menu.buildFromTemplate([ - { label: 'Calendar', click: () => navigateToPiece('cal') }, - { label: 'Add Appointment', click: () => navigateToPiece('cal:add') }, // DateWizard add-flow (piece handles :add) - { type: 'separator' }, - { label: 'Day', click: () => navigateToPiece('cal:day') }, - { label: 'Week', click: () => navigateToPiece('cal:week') }, - { label: 'Month', click: () => navigateToPiece('cal:month') }, - ]); - - if (process.platform === 'darwin') { - // macOS: pop the menu manually so a plain left-click reliably opens it, - // matching the pals tray. Left-click still opens the calendar directly. - calendarTray.on('click', open); - calendarTray.on('right-click', () => calendarTray.popUpContextMenu(menu)); - } else { - calendarTray.on('click', open); - calendarTray.setContextMenu(menu); - } -} - // ========== End System Tray ========== // Update the tray title text (shown next to icon in menu bar). @@ -3222,7 +3175,7 @@ app.whenReady().then(async () => { createMenu(); createSystemTray(); - createCalendarTray(); + // Calendar tray removed — DateWizard (Swift) owns the menu-bar calendar now. // createNotepatTray(); // disabled — single pals systray icon only // Start FF1 Bridge server for kidlisp.com integration -- 2.51.2