aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-10-21 20:17:02 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-10-21 20:17:02 +0200
commitd6cfff11f70f2884f655b8636d4f5a542a8fc686 (patch)
treef3d24e29f0379475327e088c4bb88f4c5b8cc9c8 /src
parentAutomatic i18n update (i18n.meetfranz.com) (diff)
parentprovide a float instead of mixed string and int (diff)
downloadferdium-app-d6cfff11f70f2884f655b8636d4f5a542a8fc686.tar.gz
ferdium-app-d6cfff11f70f2884f655b8636d4f5a542a8fc686.tar.zst
ferdium-app-d6cfff11f70f2884f655b8636d4f5a542a8fc686.zip
Merge branch 'release/5.4.0-beta.3' into i18n
Diffstat (limited to 'src')
-rw-r--r--src/components/auth/Pricing.js4
-rw-r--r--src/containers/auth/PricingScreen.js3
-rw-r--r--src/features/planSelection/components/PlanItem.js7
-rw-r--r--src/features/planSelection/components/PlanSelection.js2
-rw-r--r--src/features/trialStatusBar/containers/TrialStatusBarScreen.js14
-rw-r--r--src/features/workspaces/components/WorkspaceDrawer.js9
-rw-r--r--src/features/workspaces/components/WorkspacesDashboard.js5
-rw-r--r--src/i18n/locales/defaultMessages.json32
-rw-r--r--src/i18n/messages/src/features/workspaces/components/WorkspacesDashboard.json32
-rw-r--r--src/lib/Menu.js4
-rw-r--r--src/lib/TouchBar.js4
-rw-r--r--src/stores/AppStore.js7
-rw-r--r--src/stores/PaymentStore.js1
-rw-r--r--src/stores/ServicesStore.js7
-rw-r--r--src/webview/lib/RecipeWebview.js10
15 files changed, 90 insertions, 51 deletions
diff --git a/src/components/auth/Pricing.js b/src/components/auth/Pricing.js
index 86b6a4263..53ae046a0 100644
--- a/src/components/auth/Pricing.js
+++ b/src/components/auth/Pricing.js
@@ -150,6 +150,7 @@ export default @observer @injectSheet(styles) class Signup extends Component {
150 classes: PropTypes.object.isRequired, 150 classes: PropTypes.object.isRequired,
151 currency: PropTypes.string.isRequired, 151 currency: PropTypes.string.isRequired,
152 price: PropTypes.number.isRequired, 152 price: PropTypes.number.isRequired,
153 name: PropTypes.string.isRequired,
153 }; 154 };
154 155
155 static contextTypes = { 156 static contextTypes = {
@@ -166,6 +167,7 @@ export default @observer @injectSheet(styles) class Signup extends Component {
166 classes, 167 classes,
167 currency, 168 currency,
168 price, 169 price,
170 name,
169 } = this.props; 171 } = this.props;
170 const { intl } = this.context; 172 const { intl } = this.context;
171 173
@@ -182,7 +184,7 @@ export default @observer @injectSheet(styles) class Signup extends Component {
182 alt="" 184 alt=""
183 /> 185 />
184 )} 186 )}
185 <h1>{intl.formatMessage(messages.headline, { name: 'Stefan' })}</h1> 187 <h1>{intl.formatMessage(messages.headline, { name })}</h1>
186 <div className="auth__letter"> 188 <div className="auth__letter">
187 <p> 189 <p>
188 {intl.formatMessage(messages.specialTreat)} 190 {intl.formatMessage(messages.specialTreat)}
diff --git a/src/containers/auth/PricingScreen.js b/src/containers/auth/PricingScreen.js
index 55811ed23..21c859c12 100644
--- a/src/containers/auth/PricingScreen.js
+++ b/src/containers/auth/PricingScreen.js
@@ -42,7 +42,7 @@ export default @inject('stores', 'actions') @observer class PricingScreen extend
42 stores, 42 stores,
43 } = this.props; 43 } = this.props;
44 44
45 const { getUserInfoRequest, activateTrialRequest } = stores.user; 45 const { getUserInfoRequest, activateTrialRequest, data } = stores.user;
46 const { featuresRequest, features } = stores.features; 46 const { featuresRequest, features } = stores.features;
47 47
48 const { pricingConfig } = features; 48 const { pricingConfig } = features;
@@ -64,6 +64,7 @@ export default @inject('stores', 'actions') @observer class PricingScreen extend
64 error={error} 64 error={error}
65 currency={currency} 65 currency={currency}
66 price={price} 66 price={price}
67 name={data.firstname}
67 /> 68 />
68 ); 69 );
69 } 70 }
diff --git a/src/features/planSelection/components/PlanItem.js b/src/features/planSelection/components/PlanItem.js
index ea04c8448..ec061377b 100644
--- a/src/features/planSelection/components/PlanItem.js
+++ b/src/features/planSelection/components/PlanItem.js
@@ -38,7 +38,7 @@ const styles = theme => ({
38 38
39 '& h2': { 39 '& h2': {
40 textAlign: 'center', 40 textAlign: 'center',
41 marginBottom: 20, 41 marginBottom: 10,
42 fontSize: 30, 42 fontSize: 30,
43 color: theme.styleTypes.primary.contrast, 43 color: theme.styleTypes.primary.contrast,
44 }, 44 },
@@ -48,6 +48,7 @@ const styles = theme => ({
48 }, 48 },
49 priceWrapper: { 49 priceWrapper: {
50 height: 50, 50 height: 50,
51 marginBottom: 0,
51 }, 52 },
52 price: { 53 price: {
53 fontSize: 50, 54 fontSize: 50,
@@ -69,7 +70,7 @@ const styles = theme => ({
69 width: 40, 70 width: 40,
70 border: 0, 71 border: 0,
71 borderTop: [1, 'solid', theme.styleTypes.primary.contrast], 72 borderTop: [1, 'solid', theme.styleTypes.primary.contrast],
72 margin: [30, 'auto'], 73 margin: [15, 'auto', 20],
73 }, 74 },
74 header: { 75 header: {
75 padding: 20, 76 padding: 20,
@@ -78,7 +79,7 @@ const styles = theme => ({
78 position: 'relative', 79 position: 'relative',
79 }, 80 },
80 content: { 81 content: {
81 padding: 20, 82 padding: [10, 20, 20],
82 background: '#EFEFEF', 83 background: '#EFEFEF',
83 }, 84 },
84 simpleCTA: { 85 simpleCTA: {
diff --git a/src/features/planSelection/components/PlanSelection.js b/src/features/planSelection/components/PlanSelection.js
index 9407f6dd3..355187516 100644
--- a/src/features/planSelection/components/PlanSelection.js
+++ b/src/features/planSelection/components/PlanSelection.js
@@ -72,6 +72,7 @@ const styles = theme => ({
72 justifyContent: 'center', 72 justifyContent: 'center',
73 alignItems: 'center', 73 alignItems: 'center',
74 zIndex: 999999, 74 zIndex: 999999,
75 overflowY: 'scroll',
75 }, 76 },
76 container: { 77 container: {
77 width: '80%', 78 width: '80%',
@@ -111,6 +112,7 @@ const styles = theme => ({
111 112
112 '& svg': { 113 '& svg': {
113 width: '80px !important', 114 width: '80px !important',
115 height: '80px !important',
114 filter: 'drop-shadow( 0px 2px 3px rgba(0, 0, 0, 0.3))', 116 filter: 'drop-shadow( 0px 2px 3px rgba(0, 0, 0, 0.3))',
115 fill: theme.styleTypes.danger.contrast, 117 fill: theme.styleTypes.danger.contrast,
116 }, 118 },
diff --git a/src/features/trialStatusBar/containers/TrialStatusBarScreen.js b/src/features/trialStatusBar/containers/TrialStatusBarScreen.js
index 15201496b..e15a1204f 100644
--- a/src/features/trialStatusBar/containers/TrialStatusBarScreen.js
+++ b/src/features/trialStatusBar/containers/TrialStatusBarScreen.js
@@ -2,15 +2,21 @@ import React, { Component } from 'react';
2import { observer, inject } from 'mobx-react'; 2import { observer, inject } from 'mobx-react';
3import PropTypes from 'prop-types'; 3import PropTypes from 'prop-types';
4import ms from 'ms'; 4import ms from 'ms';
5import { intlShape } from 'react-intl';
5 6
6import FeaturesStore from '../../../stores/FeaturesStore'; 7import FeaturesStore from '../../../stores/FeaturesStore';
7import UserStore from '../../../stores/UserStore'; 8import UserStore from '../../../stores/UserStore';
8import TrialStatusBar from '../components/TrialStatusBar'; 9import TrialStatusBar from '../components/TrialStatusBar';
9import ErrorBoundary from '../../../components/util/ErrorBoundary'; 10import ErrorBoundary from '../../../components/util/ErrorBoundary';
10import { trialStatusBarStore } from '..'; 11import { trialStatusBarStore } from '..';
12import { i18nPlanName } from '../../../helpers/plan-helpers';
11 13
12@inject('stores', 'actions') @observer 14@inject('stores', 'actions') @observer
13class TrialStatusBarScreen extends Component { 15class TrialStatusBarScreen extends Component {
16 static contextTypes = {
17 intl: intlShape,
18 };
19
14 state = { 20 state = {
15 showOverlay: true, 21 showOverlay: true,
16 percent: 0, 22 percent: 0,
@@ -53,6 +59,8 @@ class TrialStatusBarScreen extends Component {
53 59
54 60
55 render() { 61 render() {
62 const { intl } = this.context;
63
56 const { 64 const {
57 showOverlay, 65 showOverlay,
58 percent, 66 percent,
@@ -67,11 +75,13 @@ class TrialStatusBarScreen extends Component {
67 const { user } = this.props.stores; 75 const { user } = this.props.stores;
68 const { upgradeAccount } = this.props.actions.payment; 76 const { upgradeAccount } = this.props.actions.payment;
69 77
78 const planName = i18nPlanName(user.team.plan, intl);
79
70 return ( 80 return (
71 <ErrorBoundary> 81 <ErrorBoundary>
72 <TrialStatusBar 82 <TrialStatusBar
73 planName="Professional" 83 planName={planName}
74 percent={percent < 5 ? 5 : percent} 84 percent={parseFloat(percent < 5 ? 5 : percent)}
75 trialEnd={restTime} 85 trialEnd={restTime}
76 upgradeAccount={() => upgradeAccount({ 86 upgradeAccount={() => upgradeAccount({
77 planId: user.team.plan, 87 planId: user.team.plan,
diff --git a/src/features/workspaces/components/WorkspaceDrawer.js b/src/features/workspaces/components/WorkspaceDrawer.js
index ee6f8416c..07100f5a1 100644
--- a/src/features/workspaces/components/WorkspaceDrawer.js
+++ b/src/features/workspaces/components/WorkspaceDrawer.js
@@ -7,7 +7,7 @@ import { H1, Icon, ProBadge } from '@meetfranz/ui';
7import { Button } from '@meetfranz/forms/lib'; 7import { Button } from '@meetfranz/forms/lib';
8import ReactTooltip from 'react-tooltip'; 8import ReactTooltip from 'react-tooltip';
9 9
10import { mdiPlusBox, mdiSettings } from '@mdi/js'; 10import { mdiPlusBox, mdiSettings, mdiStar } from '@mdi/js';
11import WorkspaceDrawerItem from './WorkspaceDrawerItem'; 11import WorkspaceDrawerItem from './WorkspaceDrawerItem';
12import { workspaceActions } from '../actions'; 12import { workspaceActions } from '../actions';
13import { GA_CATEGORY_WORKSPACES, workspaceStore } from '../index'; 13import { GA_CATEGORY_WORKSPACES, workspaceStore } from '../index';
@@ -52,6 +52,8 @@ const styles = theme => ({
52 drawer: { 52 drawer: {
53 background: theme.workspaces.drawer.background, 53 background: theme.workspaces.drawer.background,
54 width: `${theme.workspaces.drawer.width}px`, 54 width: `${theme.workspaces.drawer.width}px`,
55 display: 'flex',
56 flexDirection: 'column',
55 }, 57 },
56 headline: { 58 headline: {
57 fontSize: '24px', 59 fontSize: '24px',
@@ -75,6 +77,7 @@ const styles = theme => ({
75 }, 77 },
76 workspaces: { 78 workspaces: {
77 height: 'auto', 79 height: 'auto',
80 overflowY: 'scroll',
78 }, 81 },
79 premiumAnnouncement: { 82 premiumAnnouncement: {
80 padding: '20px', 83 padding: '20px',
@@ -89,7 +92,7 @@ const styles = theme => ({
89 addNewWorkspaceLabel: { 92 addNewWorkspaceLabel: {
90 height: 'auto', 93 height: 'auto',
91 color: theme.workspaces.drawer.buttons.color, 94 color: theme.workspaces.drawer.buttons.color,
92 marginTop: 40, 95 margin: [40, 0],
93 textAlign: 'center', 96 textAlign: 'center',
94 '& > svg': { 97 '& > svg': {
95 fill: theme.workspaces.drawer.buttons.color, 98 fill: theme.workspaces.drawer.buttons.color,
@@ -174,7 +177,7 @@ class WorkspaceDrawer extends Component {
174 className={classes.premiumCtaButton} 177 className={classes.premiumCtaButton}
175 buttonType="primary" 178 buttonType="primary"
176 label={intl.formatMessage(messages.reactivatePremiumAccount)} 179 label={intl.formatMessage(messages.reactivatePremiumAccount)}
177 icon="mdiStar" 180 icon={mdiStar}
178 onClick={() => { 181 onClick={() => {
179 onUpgradeAccountClick(); 182 onUpgradeAccountClick();
180 gaEvent('User', 'upgrade', 'workspaceDrawer'); 183 gaEvent('User', 'upgrade', 'workspaceDrawer');
diff --git a/src/features/workspaces/components/WorkspacesDashboard.js b/src/features/workspaces/components/WorkspacesDashboard.js
index 70e213912..4fb302be2 100644
--- a/src/features/workspaces/components/WorkspacesDashboard.js
+++ b/src/features/workspaces/components/WorkspacesDashboard.js
@@ -5,6 +5,7 @@ import { defineMessages, intlShape } from 'react-intl';
5import injectSheet from 'react-jss'; 5import injectSheet from 'react-jss';
6import { Infobox, Badge } from '@meetfranz/ui'; 6import { Infobox, Badge } from '@meetfranz/ui';
7 7
8import { mdiCheckboxMarkedCircleOutline } from '@mdi/js';
8import Loader from '../../../components/ui/Loader'; 9import Loader from '../../../components/ui/Loader';
9import WorkspaceItem from './WorkspaceItem'; 10import WorkspaceItem from './WorkspaceItem';
10import CreateWorkspaceForm from './CreateWorkspaceForm'; 11import CreateWorkspaceForm from './CreateWorkspaceForm';
@@ -128,7 +129,7 @@ class WorkspacesDashboard extends Component {
128 <Appear className={classes.appear}> 129 <Appear className={classes.appear}>
129 <Infobox 130 <Infobox
130 type="success" 131 type="success"
131 icon="mdiCheckboxMarkedCircleOutline" 132 icon={mdiCheckboxMarkedCircleOutline}
132 dismissable 133 dismissable
133 onUnmount={updateWorkspaceRequest.reset} 134 onUnmount={updateWorkspaceRequest.reset}
134 > 135 >
@@ -142,7 +143,7 @@ class WorkspacesDashboard extends Component {
142 <Appear className={classes.appear}> 143 <Appear className={classes.appear}>
143 <Infobox 144 <Infobox
144 type="success" 145 type="success"
145 icon="mdiCheckboxMarkedCircleOutline" 146 icon={mdiCheckboxMarkedCircleOutline}
146 dismissable 147 dismissable
147 onUnmount={deleteWorkspaceRequest.reset} 148 onUnmount={deleteWorkspaceRequest.reset}
148 > 149 >
diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json
index e283614d2..9818dca87 100644
--- a/src/i18n/locales/defaultMessages.json
+++ b/src/i18n/locales/defaultMessages.json
@@ -4861,104 +4861,104 @@
4861 "defaultMessage": "!!!Your workspaces", 4861 "defaultMessage": "!!!Your workspaces",
4862 "end": { 4862 "end": {
4863 "column": 3, 4863 "column": 3,
4864 "line": 22 4864 "line": 23
4865 }, 4865 },
4866 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 4866 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
4867 "id": "settings.workspaces.headline", 4867 "id": "settings.workspaces.headline",
4868 "start": { 4868 "start": {
4869 "column": 12, 4869 "column": 12,
4870 "line": 19 4870 "line": 20
4871 } 4871 }
4872 }, 4872 },
4873 { 4873 {
4874 "defaultMessage": "!!!You haven't added any workspaces yet.", 4874 "defaultMessage": "!!!You haven't added any workspaces yet.",
4875 "end": { 4875 "end": {
4876 "column": 3, 4876 "column": 3,
4877 "line": 26 4877 "line": 27
4878 }, 4878 },
4879 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 4879 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
4880 "id": "settings.workspaces.noWorkspacesAdded", 4880 "id": "settings.workspaces.noWorkspacesAdded",
4881 "start": { 4881 "start": {
4882 "column": 19, 4882 "column": 19,
4883 "line": 23 4883 "line": 24
4884 } 4884 }
4885 }, 4885 },
4886 { 4886 {
4887 "defaultMessage": "!!!Could not load your workspaces", 4887 "defaultMessage": "!!!Could not load your workspaces",
4888 "end": { 4888 "end": {
4889 "column": 3, 4889 "column": 3,
4890 "line": 30 4890 "line": 31
4891 }, 4891 },
4892 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 4892 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
4893 "id": "settings.workspaces.workspacesRequestFailed", 4893 "id": "settings.workspaces.workspacesRequestFailed",
4894 "start": { 4894 "start": {
4895 "column": 27, 4895 "column": 27,
4896 "line": 27 4896 "line": 28
4897 } 4897 }
4898 }, 4898 },
4899 { 4899 {
4900 "defaultMessage": "!!!Try again", 4900 "defaultMessage": "!!!Try again",
4901 "end": { 4901 "end": {
4902 "column": 3, 4902 "column": 3,
4903 "line": 34 4903 "line": 35
4904 }, 4904 },
4905 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 4905 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
4906 "id": "settings.workspaces.tryReloadWorkspaces", 4906 "id": "settings.workspaces.tryReloadWorkspaces",
4907 "start": { 4907 "start": {
4908 "column": 23, 4908 "column": 23,
4909 "line": 31 4909 "line": 32
4910 } 4910 }
4911 }, 4911 },
4912 { 4912 {
4913 "defaultMessage": "!!!Your changes have been saved", 4913 "defaultMessage": "!!!Your changes have been saved",
4914 "end": { 4914 "end": {
4915 "column": 3, 4915 "column": 3,
4916 "line": 38 4916 "line": 39
4917 }, 4917 },
4918 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 4918 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
4919 "id": "settings.workspaces.updatedInfo", 4919 "id": "settings.workspaces.updatedInfo",
4920 "start": { 4920 "start": {
4921 "column": 15, 4921 "column": 15,
4922 "line": 35 4922 "line": 36
4923 } 4923 }
4924 }, 4924 },
4925 { 4925 {
4926 "defaultMessage": "!!!Workspace has been deleted", 4926 "defaultMessage": "!!!Workspace has been deleted",
4927 "end": { 4927 "end": {
4928 "column": 3, 4928 "column": 3,
4929 "line": 42 4929 "line": 43
4930 }, 4930 },
4931 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 4931 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
4932 "id": "settings.workspaces.deletedInfo", 4932 "id": "settings.workspaces.deletedInfo",
4933 "start": { 4933 "start": {
4934 "column": 15, 4934 "column": 15,
4935 "line": 39 4935 "line": 40
4936 } 4936 }
4937 }, 4937 },
4938 { 4938 {
4939 "defaultMessage": "!!!Info about workspace feature", 4939 "defaultMessage": "!!!Info about workspace feature",
4940 "end": { 4940 "end": {
4941 "column": 3, 4941 "column": 3,
4942 "line": 46 4942 "line": 47
4943 }, 4943 },
4944 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 4944 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
4945 "id": "settings.workspaces.workspaceFeatureInfo", 4945 "id": "settings.workspaces.workspaceFeatureInfo",
4946 "start": { 4946 "start": {
4947 "column": 24, 4947 "column": 24,
4948 "line": 43 4948 "line": 44
4949 } 4949 }
4950 }, 4950 },
4951 { 4951 {
4952 "defaultMessage": "!!!Less is More: Introducing Franz Workspaces", 4952 "defaultMessage": "!!!Less is More: Introducing Franz Workspaces",
4953 "end": { 4953 "end": {
4954 "column": 3, 4954 "column": 3,
4955 "line": 50 4955 "line": 51
4956 }, 4956 },
4957 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 4957 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
4958 "id": "settings.workspaces.workspaceFeatureHeadline", 4958 "id": "settings.workspaces.workspaceFeatureHeadline",
4959 "start": { 4959 "start": {
4960 "column": 28, 4960 "column": 28,
4961 "line": 47 4961 "line": 48
4962 } 4962 }
4963 } 4963 }
4964 ], 4964 ],
diff --git a/src/i18n/messages/src/features/workspaces/components/WorkspacesDashboard.json b/src/i18n/messages/src/features/workspaces/components/WorkspacesDashboard.json
index 7eb4fab50..8a20eb8e8 100644
--- a/src/i18n/messages/src/features/workspaces/components/WorkspacesDashboard.json
+++ b/src/i18n/messages/src/features/workspaces/components/WorkspacesDashboard.json
@@ -4,11 +4,11 @@
4 "defaultMessage": "!!!Your workspaces", 4 "defaultMessage": "!!!Your workspaces",
5 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 5 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
6 "start": { 6 "start": {
7 "line": 19, 7 "line": 20,
8 "column": 12 8 "column": 12
9 }, 9 },
10 "end": { 10 "end": {
11 "line": 22, 11 "line": 23,
12 "column": 3 12 "column": 3
13 } 13 }
14 }, 14 },
@@ -17,11 +17,11 @@
17 "defaultMessage": "!!!You haven't added any workspaces yet.", 17 "defaultMessage": "!!!You haven't added any workspaces yet.",
18 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 18 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
19 "start": { 19 "start": {
20 "line": 23, 20 "line": 24,
21 "column": 19 21 "column": 19
22 }, 22 },
23 "end": { 23 "end": {
24 "line": 26, 24 "line": 27,
25 "column": 3 25 "column": 3
26 } 26 }
27 }, 27 },
@@ -30,11 +30,11 @@
30 "defaultMessage": "!!!Could not load your workspaces", 30 "defaultMessage": "!!!Could not load your workspaces",
31 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 31 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
32 "start": { 32 "start": {
33 "line": 27, 33 "line": 28,
34 "column": 27 34 "column": 27
35 }, 35 },
36 "end": { 36 "end": {
37 "line": 30, 37 "line": 31,
38 "column": 3 38 "column": 3
39 } 39 }
40 }, 40 },
@@ -43,11 +43,11 @@
43 "defaultMessage": "!!!Try again", 43 "defaultMessage": "!!!Try again",
44 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 44 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
45 "start": { 45 "start": {
46 "line": 31, 46 "line": 32,
47 "column": 23 47 "column": 23
48 }, 48 },
49 "end": { 49 "end": {
50 "line": 34, 50 "line": 35,
51 "column": 3 51 "column": 3
52 } 52 }
53 }, 53 },
@@ -56,11 +56,11 @@
56 "defaultMessage": "!!!Your changes have been saved", 56 "defaultMessage": "!!!Your changes have been saved",
57 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 57 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
58 "start": { 58 "start": {
59 "line": 35, 59 "line": 36,
60 "column": 15 60 "column": 15
61 }, 61 },
62 "end": { 62 "end": {
63 "line": 38, 63 "line": 39,
64 "column": 3 64 "column": 3
65 } 65 }
66 }, 66 },
@@ -69,11 +69,11 @@
69 "defaultMessage": "!!!Workspace has been deleted", 69 "defaultMessage": "!!!Workspace has been deleted",
70 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 70 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
71 "start": { 71 "start": {
72 "line": 39, 72 "line": 40,
73 "column": 15 73 "column": 15
74 }, 74 },
75 "end": { 75 "end": {
76 "line": 42, 76 "line": 43,
77 "column": 3 77 "column": 3
78 } 78 }
79 }, 79 },
@@ -82,11 +82,11 @@
82 "defaultMessage": "!!!Info about workspace feature", 82 "defaultMessage": "!!!Info about workspace feature",
83 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 83 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
84 "start": { 84 "start": {
85 "line": 43, 85 "line": 44,
86 "column": 24 86 "column": 24
87 }, 87 },
88 "end": { 88 "end": {
89 "line": 46, 89 "line": 47,
90 "column": 3 90 "column": 3
91 } 91 }
92 }, 92 },
@@ -95,11 +95,11 @@
95 "defaultMessage": "!!!Less is More: Introducing Franz Workspaces", 95 "defaultMessage": "!!!Less is More: Introducing Franz Workspaces",
96 "file": "src/features/workspaces/components/WorkspacesDashboard.js", 96 "file": "src/features/workspaces/components/WorkspacesDashboard.js",
97 "start": { 97 "start": {
98 "line": 47, 98 "line": 48,
99 "column": 28 99 "column": 28
100 }, 100 },
101 "end": { 101 "end": {
102 "line": 50, 102 "line": 51,
103 "column": 3 103 "column": 3
104 } 104 }
105 } 105 }
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;
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index ca5cad836..0a6309092 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -207,10 +207,9 @@ export default class AppStore extends Store {
207 if (this.timeSuspensionStart.add(10, 'm').isBefore(moment())) { 207 if (this.timeSuspensionStart.add(10, 'm').isBefore(moment())) {
208 debug('Reloading services, user info and features'); 208 debug('Reloading services, user info and features');
209 209
210 this.actions.service.reloadAll(); 210 setTimeout(() => {
211 211 window.location.reload();
212 this.stores.user.getUserInfoRequest.invalidate({ immediately: true }); 212 }, ms('2s'));
213 this.stores.features.featuresRequest.invalidate({ immediately: true });
214 213
215 statsEvent('resumed-app'); 214 statsEvent('resumed-app');
216 } 215 }
diff --git a/src/stores/PaymentStore.js b/src/stores/PaymentStore.js
index b90e8f006..eb42ae10e 100644
--- a/src/stores/PaymentStore.js
+++ b/src/stores/PaymentStore.js
@@ -53,6 +53,7 @@ export default class PaymentStore extends Store {
53 height: window.innerHeight - 100, 53 height: window.innerHeight - 100,
54 maxWidth: 800, 54 maxWidth: 800,
55 minWidth: 600, 55 minWidth: 600,
56 autoHideMenuBar: true,
56 webPreferences: { 57 webPreferences: {
57 nodeIntegration: true, 58 nodeIntegration: true,
58 webviewTag: true, 59 webviewTag: true,
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 70b775503..65e68e4d7 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -6,6 +6,7 @@ import {
6} from 'mobx'; 6} from 'mobx';
7import { debounce, remove } from 'lodash'; 7import { debounce, remove } from 'lodash';
8import ms from 'ms'; 8import ms from 'ms';
9import { remote } from 'electron';
9 10
10import Store from './lib/Store'; 11import Store from './lib/Store';
11import Request from './lib/Request'; 12import Request from './lib/Request';
@@ -18,6 +19,8 @@ import { RESTRICTION_TYPES } from '../models/Service';
18 19
19const debug = require('debug')('Franz:ServiceStore'); 20const debug = require('debug')('Franz:ServiceStore');
20 21
22const { app } = remote;
23
21export default class ServicesStore extends Store { 24export default class ServicesStore extends Store {
22 @observable allServicesRequest = new CachedRequest(this.api.services, 'all'); 25 @observable allServicesRequest = new CachedRequest(this.api.services, 'all');
23 26
@@ -728,7 +731,9 @@ export default class ServicesStore extends Store {
728 731
729 if (service.webview) { 732 if (service.webview) {
730 debug('Initialize recipe', service.recipe.id, service.name); 733 debug('Initialize recipe', service.recipe.id, service.name);
731 service.webview.send('initialize-recipe', service.shareWithWebview, service.recipe); 734 service.webview.send('initialize-recipe', Object.assign({
735 franzVersion: app.getVersion(),
736 }, service.shareWithWebview), service.recipe);
732 } 737 }
733 } 738 }
734 739
diff --git a/src/webview/lib/RecipeWebview.js b/src/webview/lib/RecipeWebview.js
index be29142af..859f7787f 100644
--- a/src/webview/lib/RecipeWebview.js
+++ b/src/webview/lib/RecipeWebview.js
@@ -1,7 +1,8 @@
1// @flow
2const { ipcRenderer } = require('electron'); 1const { ipcRenderer } = require('electron');
3const fs = require('fs-extra'); 2const fs = require('fs-extra');
4 3
4const debug = require('debug')('Franz:Plugin:RecipeWebview');
5
5class RecipeWebview { 6class RecipeWebview {
6 constructor() { 7 constructor() {
7 this.countCache = { 8 this.countCache = {
@@ -11,6 +12,8 @@ class RecipeWebview {
11 12
12 ipcRenderer.on('poll', () => { 13 ipcRenderer.on('poll', () => {
13 this.loopFunc(); 14 this.loopFunc();
15
16 debug('Poll event');
14 }); 17 });
15 } 18 }
16 19
@@ -44,8 +47,11 @@ class RecipeWebview {
44 indirect: indirect > 0 ? indirect : 0, 47 indirect: indirect > 0 ? indirect : 0,
45 }; 48 };
46 49
50
47 ipcRenderer.sendToHost('messages', count); 51 ipcRenderer.sendToHost('messages', count);
48 Object.assign(this.countCache, count); 52 Object.assign(this.countCache, count);
53
54 debug('Sending badge count to host', count);
49 } 55 }
50 56
51 /** 57 /**
@@ -61,6 +67,8 @@ class RecipeWebview {
61 styles.innerHTML = data.toString(); 67 styles.innerHTML = data.toString();
62 68
63 document.querySelector('head').appendChild(styles); 69 document.querySelector('head').appendChild(styles);
70
71 debug('Append styles', styles);
64 }); 72 });
65 } 73 }
66 74