diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Menu.js | 15 | ||||
-rw-r--r-- | src/lib/analytics.js | 2 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index e3f8a04fa..32ec1b207 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -285,7 +285,7 @@ const _templateFactory = intl => [ | |||
285 | submenu: [ | 285 | submenu: [ |
286 | { | 286 | { |
287 | label: intl.formatMessage(menuItems.learnMore), | 287 | label: intl.formatMessage(menuItems.learnMore), |
288 | click() { shell.openExternal('http://meetfranz.com'); }, | 288 | click() { shell.openExternal('https://meetfranz.com'); }, |
289 | }, | 289 | }, |
290 | { | 290 | { |
291 | label: intl.formatMessage(menuItems.changelog), | 291 | label: intl.formatMessage(menuItems.changelog), |
@@ -296,7 +296,7 @@ const _templateFactory = intl => [ | |||
296 | }, | 296 | }, |
297 | { | 297 | { |
298 | label: intl.formatMessage(menuItems.support), | 298 | label: intl.formatMessage(menuItems.support), |
299 | click() { shell.openExternal('http://meetfranz.com/support'); }, | 299 | click() { shell.openExternal('https://meetfranz.com/support'); }, |
300 | }, | 300 | }, |
301 | { | 301 | { |
302 | type: 'separator', | 302 | type: 'separator', |
@@ -485,7 +485,9 @@ export default class FranzMenu { | |||
485 | this.stores = stores; | 485 | this.stores = stores; |
486 | this.actions = actions; | 486 | this.actions = actions; |
487 | 487 | ||
488 | autorun(this._build.bind(this)); | 488 | setTimeout(() => { |
489 | autorun(this._build.bind(this)); | ||
490 | }, 10); | ||
489 | } | 491 | } |
490 | 492 | ||
491 | rebuild() { | 493 | rebuild() { |
@@ -497,7 +499,6 @@ export default class FranzMenu { | |||
497 | } | 499 | } |
498 | 500 | ||
499 | _build() { | 501 | _build() { |
500 | // console.log(window.franz); | ||
501 | const serviceTpl = Object.assign([], this.serviceTpl); // need to clone object so we don't modify computed (cached) object | 502 | const serviceTpl = Object.assign([], this.serviceTpl); // need to clone object so we don't modify computed (cached) object |
502 | 503 | ||
503 | if (window.franz === undefined) { | 504 | if (window.franz === undefined) { |
@@ -521,6 +522,7 @@ export default class FranzMenu { | |||
521 | click: () => { | 522 | click: () => { |
522 | this.actions.service.openDevToolsForActiveService(); | 523 | this.actions.service.openDevToolsForActiveService(); |
523 | }, | 524 | }, |
525 | enabled: this.stores.user.isLoggedIn && this.stores.services.enabled.length > 0, | ||
524 | }); | 526 | }); |
525 | 527 | ||
526 | tpl[1].submenu.unshift({ | 528 | tpl[1].submenu.unshift({ |
@@ -559,6 +561,7 @@ export default class FranzMenu { | |||
559 | click: () => { | 561 | click: () => { |
560 | this.actions.ui.openSettings({ path: 'app' }); | 562 | this.actions.ui.openSettings({ path: 'app' }); |
561 | }, | 563 | }, |
564 | enabled: this.stores.user.isLoggedIn, | ||
562 | }, | 565 | }, |
563 | { | 566 | { |
564 | type: 'separator', | 567 | type: 'separator', |
@@ -640,6 +643,7 @@ export default class FranzMenu { | |||
640 | click: () => { | 643 | click: () => { |
641 | this.actions.ui.openSettings({ path: 'app' }); | 644 | this.actions.ui.openSettings({ path: 'app' }); |
642 | }, | 645 | }, |
646 | enabled: this.stores.user.isLoggedIn, | ||
643 | }, | 647 | }, |
644 | { | 648 | { |
645 | type: 'separator', | 649 | type: 'separator', |
@@ -661,6 +665,7 @@ export default class FranzMenu { | |||
661 | click: () => { | 665 | click: () => { |
662 | this.actions.ui.openSettings({ path: 'recipes' }); | 666 | this.actions.ui.openSettings({ path: 'recipes' }); |
663 | }, | 667 | }, |
668 | enabled: this.stores.user.isLoggedIn, | ||
664 | }, { | 669 | }, { |
665 | type: 'separator', | 670 | type: 'separator', |
666 | }); | 671 | }); |
@@ -680,7 +685,7 @@ export default class FranzMenu { | |||
680 | if (this.stores.user.isLoggedIn) { | 685 | if (this.stores.user.isLoggedIn) { |
681 | return services.map((service, i) => ({ | 686 | return services.map((service, i) => ({ |
682 | label: this._getServiceName(service), | 687 | label: this._getServiceName(service), |
683 | accelerator: i <= 9 ? `${cmdKey}+${i + 1}` : null, | 688 | accelerator: i < 9 ? `${cmdKey}+${i + 1}` : null, |
684 | type: 'radio', | 689 | type: 'radio', |
685 | checked: service.isActive, | 690 | checked: service.isActive, |
686 | click: () => { | 691 | click: () => { |
diff --git a/src/lib/analytics.js b/src/lib/analytics.js index 585cbcdba..8b9a44579 100644 --- a/src/lib/analytics.js +++ b/src/lib/analytics.js | |||
@@ -2,7 +2,7 @@ import { remote } from 'electron'; | |||
2 | import { GA_ID } from '../config'; | 2 | import { GA_ID } from '../config'; |
3 | // import { isDevMode } from '../environment'; | 3 | // import { isDevMode } from '../environment'; |
4 | 4 | ||
5 | const debug = require('debug')('Analytics'); | 5 | const debug = require('debug')('Franz:Analytics'); |
6 | 6 | ||
7 | const { app } = remote; | 7 | const { app } = remote; |
8 | 8 | ||