diff options
Diffstat (limited to 'src/lib/TouchBar.js')
-rw-r--r-- | src/lib/TouchBar.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/TouchBar.js b/src/lib/TouchBar.js index 32f546644..11eaec306 100644 --- a/src/lib/TouchBar.js +++ b/src/lib/TouchBar.js | |||
@@ -1,6 +1,6 @@ | |||
1 | import os from 'os'; | 1 | import os from 'os'; |
2 | import semver from 'semver'; | 2 | import semver from 'semver'; |
3 | import { remote } from 'electron'; | 3 | import { TouchBar, getCurrentWindow } from '@electron/remote'; |
4 | import { autorun } from 'mobx'; | 4 | import { autorun } from 'mobx'; |
5 | 5 | ||
6 | import { isMac } from '../environment'; | 6 | import { isMac } from '../environment'; |
@@ -22,14 +22,13 @@ export default class FranzTouchBar { | |||
22 | } | 22 | } |
23 | 23 | ||
24 | _build() { | 24 | _build() { |
25 | const currentWindow = remote.getCurrentWindow(); | 25 | const currentWindow = getCurrentWindow(); |
26 | 26 | ||
27 | if (this.stores.router.location.pathname.startsWith('/payment/')) { | 27 | if (this.stores.router.location.pathname.startsWith('/payment/')) { |
28 | return; | 28 | return; |
29 | } | 29 | } |
30 | 30 | ||
31 | if (this.stores.user.isLoggedIn) { | 31 | if (this.stores.user.isLoggedIn) { |
32 | const { TouchBar } = remote; | ||
33 | const { TouchBarButton, TouchBarSpacer } = TouchBar; | 32 | const { TouchBarButton, TouchBarSpacer } = TouchBar; |
34 | 33 | ||
35 | const buttons = []; | 34 | const buttons = []; |