feat(kopiaui): support both left and right click to open tray menu
* feat(kopiaui): support both left and right click to open tray menu
Fixes
* feat(kopiaui): show all repository windows on double click
@@ -305,6 +305,15 @@ function showAllRepoWindows() {
allConfigs().forEach(showRepoWindow);
}
+function safeTrayHandler(ev, h) {
+ tray.on(ev, () => {
+ try {
+ h();
+ } catch (e) {
+ }
+ })
+}
+
app.on('ready', () => {
loadConfigs();
@@ -327,6 +336,11 @@ app.on('ready', () => {
selectByOS({ mac: 'kopia-tray.png', win: 'kopia-tray.ico', linux: 'kopia-tray.png' })));
tray.setToolTip('Kopia');
+
+ safeTrayHandler("click", () => tray.popUpContextMenu());
+ safeTrayHandler("right-click", () => tray.popUpContextMenu());
+ safeTrayHandler("double-click", () => showAllRepoWindows());
+
updateTrayContextMenu();
refreshWillLaunchAtStartup();
updateDockIcon();
