aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/Menu.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Menu.js')
-rw-r--r--src/lib/Menu.js24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js
index 81efaf18f..13b31bcad 100644
--- a/src/lib/Menu.js
+++ b/src/lib/Menu.js
@@ -3,9 +3,8 @@ import { observable, autorun } from 'mobx';
3import { defineMessages } from 'react-intl'; 3import { defineMessages } from 'react-intl';
4 4
5import { isMac, ctrlKey, cmdKey } from '../environment'; 5import { isMac, ctrlKey, cmdKey } from '../environment';
6import { GA_CATEGORY_WORKSPACES, workspaceStore } from '../features/workspaces/index'; 6import { workspaceStore } from '../features/workspaces/index';
7import { workspaceActions } from '../features/workspaces/actions'; 7import { workspaceActions } from '../features/workspaces/actions';
8import { gaEvent } from './analytics';
9import { announcementActions } from '../features/announcements/actions'; 8import { announcementActions } from '../features/announcements/actions';
10import { announcementsStore } from '../features/announcements'; 9import { announcementsStore } from '../features/announcements';
11import TodoStore from '../features/todos/store'; 10import TodoStore from '../features/todos/store';
@@ -141,7 +140,7 @@ const menuItems = defineMessages({
141 }, 140 },
142 debugInfoCopiedHeadline: { 141 debugInfoCopiedHeadline: {
143 id: 'menu.help.debugInfoCopiedHeadline', 142 id: 'menu.help.debugInfoCopiedHeadline',
144 defaultMessage: '!!!Franz Debug Information', 143 defaultMessage: '!!!Ferdi Debug Information',
145 }, 144 },
146 debugInfoCopiedBody: { 145 debugInfoCopiedBody: {
147 id: 'menu.help.debugInfoCopiedBody', 146 id: 'menu.help.debugInfoCopiedBody',
@@ -262,7 +261,7 @@ const menuItems = defineMessages({
262}); 261});
263 262
264function getActiveWebview() { 263function getActiveWebview() {
265 return window.franz.stores.services.active.webview; 264 return window.ferdi.stores.services.active.webview;
266} 265}
267 266
268const _templateFactory = intl => [ 267const _templateFactory = intl => [
@@ -398,7 +397,7 @@ const _templateFactory = intl => [
398 click: () => { 397 click: () => {
399 announcementActions.show(); 398 announcementActions.show();
400 }, 399 },
401 visible: window.franz.stores.user.isLoggedIn && announcementsStore.areNewsAvailable, 400 visible: window.ferdi.stores.user.isLoggedIn && announcementsStore.areNewsAvailable,
402 }, 401 },
403 { 402 {
404 type: 'separator', 403 type: 'separator',
@@ -620,11 +619,11 @@ export default class FranzMenu {
620 // need to clone object so we don't modify computed (cached) object 619 // need to clone object so we don't modify computed (cached) object
621 const serviceTpl = Object.assign([], this.serviceTpl()); 620 const serviceTpl = Object.assign([], this.serviceTpl());
622 621
623 if (window.franz === undefined) { 622 if (window.ferdi === undefined) {
624 return; 623 return;
625 } 624 }
626 625
627 const { intl } = window.franz; 626 const { intl } = window.ferdi;
628 const tpl = isMac ? _templateFactory(intl) : _titleBarTemplateFactory(intl); 627 const tpl = isMac ? _templateFactory(intl) : _titleBarTemplateFactory(intl);
629 628
630 tpl[1].submenu.push({ 629 tpl[1].submenu.push({
@@ -821,7 +820,7 @@ export default class FranzMenu {
821 } 820 }
822 821
823 serviceTpl() { 822 serviceTpl() {
824 const { intl } = window.franz; 823 const { intl } = window.ferdi;
825 const { user, services, settings } = this.stores; 824 const { user, services, settings } = this.stores;
826 if (!user.isLoggedIn) return []; 825 if (!user.isLoggedIn) return [];
827 const menu = []; 826 const menu = [];
@@ -867,7 +866,7 @@ export default class FranzMenu {
867 866
868 workspacesMenu() { 867 workspacesMenu() {
869 const { workspaces, activeWorkspace, isWorkspaceDrawerOpen } = workspaceStore; 868 const { workspaces, activeWorkspace, isWorkspaceDrawerOpen } = workspaceStore;
870 const { intl } = window.franz; 869 const { intl } = window.ferdi;
871 const menu = []; 870 const menu = [];
872 871
873 // Add new workspace item: 872 // Add new workspace item:
@@ -889,7 +888,6 @@ export default class FranzMenu {
889 accelerator: `${cmdKey}+D`, 888 accelerator: `${cmdKey}+D`,
890 click: () => { 889 click: () => {
891 workspaceActions.toggleWorkspaceDrawer(); 890 workspaceActions.toggleWorkspaceDrawer();
892 gaEvent(GA_CATEGORY_WORKSPACES, 'toggleDrawer', 'menu');
893 }, 891 },
894 enabled: this.stores.user.isLoggedIn, 892 enabled: this.stores.user.isLoggedIn,
895 }, { 893 }, {
@@ -904,7 +902,6 @@ export default class FranzMenu {
904 checked: !activeWorkspace, 902 checked: !activeWorkspace,
905 click: () => { 903 click: () => {
906 workspaceActions.deactivate(); 904 workspaceActions.deactivate();
907 gaEvent(GA_CATEGORY_WORKSPACES, 'switch', 'menu');
908 }, 905 },
909 }); 906 });
910 907
@@ -917,7 +914,6 @@ export default class FranzMenu {
917 checked: activeWorkspace ? workspace.id === activeWorkspace.id : false, 914 checked: activeWorkspace ? workspace.id === activeWorkspace.id : false,
918 click: () => { 915 click: () => {
919 workspaceActions.activate({ workspace }); 916 workspaceActions.activate({ workspace });
920 gaEvent(GA_CATEGORY_WORKSPACES, 'switch', 'menu');
921 }, 917 },
922 })); 918 }));
923 } 919 }
@@ -951,7 +947,7 @@ export default class FranzMenu {
951 947
952 948
953 debugMenu() { 949 debugMenu() {
954 const { intl } = window.franz; 950 const { intl } = window.ferdi;
955 951
956 return { 952 return {
957 label: intl.formatMessage(menuItems.debugInfo), 953 label: intl.formatMessage(menuItems.debugInfo),
@@ -977,7 +973,7 @@ export default class FranzMenu {
977 return service.name; 973 return service.name;
978 } 974 }
979 975
980 let name = service.recipe.name; 976 let { name } = service.recipe;
981 977
982 if (service.team) { 978 if (service.team) {
983 name = `${name} (${service.team})`; 979 name = `${name} (${service.team})`;