From 1f4437094998609caccff9ed4bf54a92a9356088 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 24 May 2025 23:51:45 +0200 Subject: [PATCH] Refactor tray menu options for monitoring actions --- main.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index bb468ed..540e212 100644 --- a/main.js +++ b/main.js @@ -618,10 +618,18 @@ app.whenReady().then(() => { click: () => { win.webContents.send('tray-add-folder'); } }, { - label: monitoringActive ? 'Monitoring (alle) STOPPEN' : 'Monitoring (alle) STARTEN', + label: 'Alle Monitorings starten', click: () => { folders.forEach(f => { - win.webContents.send('tray-toggle-monitoring', f.path); + if (!f.monitoring) win.webContents.send('tray-toggle-monitoring', f.path); + }); + } + }, + { + label: 'Alle Monitorings stoppen', + click: () => { + folders.forEach(f => { + if (f.monitoring) win.webContents.send('tray-toggle-monitoring', f.path); }); } },