diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Menu.js | 11 | ||||
-rw-r--r-- | src/lib/Tray.js | 11 |
2 files changed, 17 insertions, 5 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 892b2ff3c..8e529d859 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -1,5 +1,11 @@ | |||
1 | import { clipboard } from 'electron'; | 1 | import { clipboard } from 'electron'; |
2 | import { app, Menu, dialog, systemPreferences, getCurrentWindow } from '@electron/remote'; | 2 | import { |
3 | app, | ||
4 | Menu, | ||
5 | dialog, | ||
6 | systemPreferences, | ||
7 | getCurrentWindow, | ||
8 | } from '@electron/remote'; | ||
3 | import { autorun, observable } from 'mobx'; | 9 | import { autorun, observable } from 'mobx'; |
4 | import { defineMessages } from 'react-intl'; | 10 | import { defineMessages } from 'react-intl'; |
5 | import { | 11 | import { |
@@ -950,7 +956,8 @@ class FranzMenu { | |||
950 | click: () => { | 956 | click: () => { |
951 | this.actions.service.setActive({ serviceId: service.id }); | 957 | this.actions.service.setActive({ serviceId: service.id }); |
952 | 958 | ||
953 | if (isMac && i === 0) { // feat(Mac): Open Window with Cmd+1 | 959 | if (isMac && i === 0) { |
960 | // feat(Mac): Open Window with Cmd+1 | ||
954 | getCurrentWindow().restore(); | 961 | getCurrentWindow().restore(); |
955 | } | 962 | } |
956 | }, | 963 | }, |
diff --git a/src/lib/Tray.js b/src/lib/Tray.js index 655dc416f..63382483e 100644 --- a/src/lib/Tray.js +++ b/src/lib/Tray.js | |||
@@ -33,15 +33,20 @@ export default class TrayIcon { | |||
33 | 33 | ||
34 | mainWindow = null; | 34 | mainWindow = null; |
35 | 35 | ||
36 | trayMenuTemplate = (tray) => [ | 36 | trayMenuTemplate = tray => [ |
37 | { | 37 | { |
38 | label: (tray.mainWindow.isVisible() && tray.mainWindow.isFocused()) ? 'Hide Ferdi' : 'Show Ferdi', | 38 | label: |
39 | tray.mainWindow.isVisible() && tray.mainWindow.isFocused() | ||
40 | ? 'Hide Ferdi' | ||
41 | : 'Show Ferdi', | ||
39 | click() { | 42 | click() { |
40 | tray._toggleWindow(); | 43 | tray._toggleWindow(); |
41 | }, | 44 | }, |
42 | }, | 45 | }, |
43 | { | 46 | { |
44 | label: tray.isAppMuted ? 'Enable Notifications && Audio' : 'Disable Notifications && Audio', | 47 | label: tray.isAppMuted |
48 | ? 'Enable Notifications && Audio' | ||
49 | : 'Disable Notifications && Audio', | ||
45 | click() { | 50 | click() { |
46 | if (!tray.mainWindow) return; | 51 | if (!tray.mainWindow) return; |
47 | tray.mainWindow.webContents.send('muteApp'); | 52 | tray.mainWindow.webContents.send('muteApp'); |