diff options
author | 2019-10-21 16:13:31 +0200 | |
---|---|---|
committer | 2019-10-21 16:13:31 +0200 | |
commit | 71f67c07d25919d6f6ba6655479b6c17c394a69c (patch) | |
tree | 4ebdf63d1f0c2d07db89161aff42622fd6227750 | |
parent | Update defaultMessages.json (diff) | |
download | ferdium-app-71f67c07d25919d6f6ba6655479b6c17c394a69c.tar.gz ferdium-app-71f67c07d25919d6f6ba6655479b6c17c394a69c.tar.zst ferdium-app-71f67c07d25919d6f6ba6655479b6c17c394a69c.zip |
don't initialize menu & touchbar on /payment/ routes
-rw-r--r-- | src/lib/Menu.js | 4 | ||||
-rw-r--r-- | src/lib/TouchBar.js | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index cda33baef..c0c9d940d 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -636,7 +636,9 @@ export default class FranzMenu { | |||
636 | // need to clone object so we don't modify computed (cached) object | 636 | // need to clone object so we don't modify computed (cached) object |
637 | const serviceTpl = Object.assign([], this.serviceTpl()); | 637 | const serviceTpl = Object.assign([], this.serviceTpl()); |
638 | 638 | ||
639 | if (window.franz === undefined) { | 639 | // Don't initialize when window.franz is undefined or when we are on a payment window route |
640 | if (window.franz === undefined || this.stores.router.location.pathname.startsWith('/payment/')) { | ||
641 | console.log('skipping menu init'); | ||
640 | return; | 642 | return; |
641 | } | 643 | } |
642 | 644 | ||
diff --git a/src/lib/TouchBar.js b/src/lib/TouchBar.js index 1de46d2a3..32f546644 100644 --- a/src/lib/TouchBar.js +++ b/src/lib/TouchBar.js | |||
@@ -24,6 +24,10 @@ export default class FranzTouchBar { | |||
24 | _build() { | 24 | _build() { |
25 | const currentWindow = remote.getCurrentWindow(); | 25 | const currentWindow = remote.getCurrentWindow(); |
26 | 26 | ||
27 | if (this.stores.router.location.pathname.startsWith('/payment/')) { | ||
28 | return; | ||
29 | } | ||
30 | |||
27 | if (this.stores.user.isLoggedIn) { | 31 | if (this.stores.user.isLoggedIn) { |
28 | const { TouchBar } = remote; | 32 | const { TouchBar } = remote; |
29 | const { TouchBarButton, TouchBarSpacer } = TouchBar; | 33 | const { TouchBarButton, TouchBarSpacer } = TouchBar; |