diff options
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | src/app.js | 2 | ||||
-rw-r--r-- | src/components/auth/Import.js | 17 | ||||
-rw-r--r-- | src/components/auth/Pricing.js | 2 | ||||
-rw-r--r-- | src/components/settings/account/AccountDashboard.js | 2 | ||||
-rw-r--r-- | src/components/subscription/SubscriptionForm.js (renamed from src/components/ui/Subscription.js) | 0 | ||||
-rw-r--r-- | src/components/subscription/SubscriptionPopup.js (renamed from src/components/ui/SubscriptionPopup.js) | 0 | ||||
-rw-r--r-- | src/containers/subscription/SubscriptionFormScreen.js (renamed from src/containers/ui/SubscriptionFormScreen.js) | 2 | ||||
-rw-r--r-- | src/containers/subscription/SubscriptionPopupScreen.js (renamed from src/containers/ui/SubscriptionPopupScreen.js) | 2 | ||||
-rw-r--r-- | src/models/Service.js | 1 | ||||
-rw-r--r-- | src/stores/ServicesStore.js | 6 | ||||
-rw-r--r-- | yarn.lock | 6 |
12 files changed, 23 insertions, 19 deletions
diff --git a/package.json b/package.json index 34190047b..d6b11ec96 100644 --- a/package.json +++ b/package.json | |||
@@ -90,7 +90,7 @@ | |||
90 | "cz-conventional-changelog": "^2.0.0", | 90 | "cz-conventional-changelog": "^2.0.0", |
91 | "del": "^2.2.2", | 91 | "del": "^2.2.2", |
92 | "dotenv": "^4.0.0", | 92 | "dotenv": "^4.0.0", |
93 | "electron": "^1.7.9", | 93 | "electron": "^1.7.12", |
94 | "electron-builder": "19.15.1", | 94 | "electron-builder": "19.15.1", |
95 | "electron-packager": "^8.7.0", | 95 | "electron-packager": "^8.7.0", |
96 | "electron-rebuild": "^1.6.0", | 96 | "electron-rebuild": "^1.6.0", |
diff --git a/src/app.js b/src/app.js index edcf273dc..814bfacf1 100644 --- a/src/app.js +++ b/src/app.js | |||
@@ -36,7 +36,7 @@ import ImportScreen from './containers/auth/ImportScreen'; | |||
36 | import PricingScreen from './containers/auth/PricingScreen'; | 36 | import PricingScreen from './containers/auth/PricingScreen'; |
37 | import InviteScreen from './containers/auth/InviteScreen'; | 37 | import InviteScreen from './containers/auth/InviteScreen'; |
38 | import AuthLayoutContainer from './containers/auth/AuthLayoutContainer'; | 38 | import AuthLayoutContainer from './containers/auth/AuthLayoutContainer'; |
39 | import SubscriptionPopupScreen from './containers/ui/SubscriptionPopupScreen'; | 39 | import SubscriptionPopupScreen from './containers/subscription/SubscriptionPopupScreen'; |
40 | 40 | ||
41 | // Add Polyfills | 41 | // Add Polyfills |
42 | smoothScroll.polyfill(); | 42 | smoothScroll.polyfill(); |
diff --git a/src/components/auth/Import.js b/src/components/auth/Import.js index 078244434..9ba14e768 100644 --- a/src/components/auth/Import.js +++ b/src/components/auth/Import.js | |||
@@ -41,21 +41,21 @@ export default class Import extends Component { | |||
41 | intl: intlShape, | 41 | intl: intlShape, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | prepareForm() { | 44 | componentWillMount() { |
45 | const { services } = this.props; | ||
46 | |||
47 | const config = { | 45 | const config = { |
48 | fields: { | 46 | fields: { |
49 | import: [...services.filter(s => s.recipe).map(s => ({ | 47 | import: [...this.props.services.filter(s => s.recipe).map(s => ({ |
50 | add: { | 48 | fields: { |
51 | default: true, | 49 | add: { |
52 | options: s, | 50 | default: true, |
51 | options: s, | ||
52 | }, | ||
53 | }, | 53 | }, |
54 | }))], | 54 | }))], |
55 | }, | 55 | }, |
56 | }; | 56 | }; |
57 | 57 | ||
58 | return new Form(config, this.context.intl); | 58 | this.form = new Form(config, this.context.intl); |
59 | } | 59 | } |
60 | 60 | ||
61 | submit(e) { | 61 | submit(e) { |
@@ -74,7 +74,6 @@ export default class Import extends Component { | |||
74 | } | 74 | } |
75 | 75 | ||
76 | render() { | 76 | render() { |
77 | this.form = this.prepareForm(); | ||
78 | const { intl } = this.context; | 77 | const { intl } = this.context; |
79 | const { services, isSubmitting, inviteRoute } = this.props; | 78 | const { services, isSubmitting, inviteRoute } = this.props; |
80 | 79 | ||
diff --git a/src/components/auth/Pricing.js b/src/components/auth/Pricing.js index 761561a89..3cc8d5f6b 100644 --- a/src/components/auth/Pricing.js +++ b/src/components/auth/Pricing.js | |||
@@ -7,7 +7,7 @@ import { defineMessages, intlShape } from 'react-intl'; | |||
7 | // import Button from '../ui/Button'; | 7 | // import Button from '../ui/Button'; |
8 | import Loader from '../ui/Loader'; | 8 | import Loader from '../ui/Loader'; |
9 | import Appear from '../ui/effects/Appear'; | 9 | import Appear from '../ui/effects/Appear'; |
10 | import SubscriptionForm from '../../containers/ui/SubscriptionFormScreen'; | 10 | import SubscriptionForm from '../../containers/subscription/SubscriptionFormScreen'; |
11 | 11 | ||
12 | const messages = defineMessages({ | 12 | const messages = defineMessages({ |
13 | headline: { | 13 | headline: { |
diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js index 43272fe96..4992f0913 100644 --- a/src/components/settings/account/AccountDashboard.js +++ b/src/components/settings/account/AccountDashboard.js | |||
@@ -9,7 +9,7 @@ import Loader from '../../ui/Loader'; | |||
9 | import Button from '../../ui/Button'; | 9 | import Button from '../../ui/Button'; |
10 | import Infobox from '../../ui/Infobox'; | 10 | import Infobox from '../../ui/Infobox'; |
11 | import Link from '../../ui/Link'; | 11 | import Link from '../../ui/Link'; |
12 | import SubscriptionForm from '../../../containers/ui/SubscriptionFormScreen'; | 12 | import SubscriptionForm from '../../../containers/subscription/SubscriptionFormScreen'; |
13 | 13 | ||
14 | const messages = defineMessages({ | 14 | const messages = defineMessages({ |
15 | headline: { | 15 | headline: { |
diff --git a/src/components/ui/Subscription.js b/src/components/subscription/SubscriptionForm.js index dd350479d..dd350479d 100644 --- a/src/components/ui/Subscription.js +++ b/src/components/subscription/SubscriptionForm.js | |||
diff --git a/src/components/ui/SubscriptionPopup.js b/src/components/subscription/SubscriptionPopup.js index 528d02907..528d02907 100644 --- a/src/components/ui/SubscriptionPopup.js +++ b/src/components/subscription/SubscriptionPopup.js | |||
diff --git a/src/containers/ui/SubscriptionFormScreen.js b/src/containers/subscription/SubscriptionFormScreen.js index ac4593670..fc6e3c4be 100644 --- a/src/containers/ui/SubscriptionFormScreen.js +++ b/src/containers/subscription/SubscriptionFormScreen.js | |||
@@ -5,7 +5,7 @@ import { inject, observer } from 'mobx-react'; | |||
5 | 5 | ||
6 | import PaymentStore from '../../stores/PaymentStore'; | 6 | import PaymentStore from '../../stores/PaymentStore'; |
7 | 7 | ||
8 | import SubscriptionForm from '../../components/ui/Subscription'; | 8 | import SubscriptionForm from '../../components/subscription/SubscriptionForm'; |
9 | 9 | ||
10 | const { BrowserWindow } = remote; | 10 | const { BrowserWindow } = remote; |
11 | 11 | ||
diff --git a/src/containers/ui/SubscriptionPopupScreen.js b/src/containers/subscription/SubscriptionPopupScreen.js index 0b6432e50..bb0603170 100644 --- a/src/containers/ui/SubscriptionPopupScreen.js +++ b/src/containers/subscription/SubscriptionPopupScreen.js | |||
@@ -2,7 +2,7 @@ import React, { Component } from 'react'; | |||
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { inject, observer } from 'mobx-react'; | 3 | import { inject, observer } from 'mobx-react'; |
4 | 4 | ||
5 | import SubscriptionPopup from '../../components/ui/SubscriptionPopup'; | 5 | import SubscriptionPopup from '../../components/subscription/SubscriptionPopup'; |
6 | 6 | ||
7 | 7 | ||
8 | @inject('stores', 'actions') @observer | 8 | @inject('stores', 'actions') @observer |
diff --git a/src/models/Service.js b/src/models/Service.js index 423510c7d..bafb3f564 100644 --- a/src/models/Service.js +++ b/src/models/Service.js | |||
@@ -6,6 +6,7 @@ export default class Service { | |||
6 | id = ''; | 6 | id = ''; |
7 | recipe = ''; | 7 | recipe = ''; |
8 | webview = null; | 8 | webview = null; |
9 | timer = null; | ||
9 | events: {}; | 10 | events: {}; |
10 | 11 | ||
11 | isAttached = false; | 12 | isAttached = false; |
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 20e07e540..99ffe5439 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -589,12 +589,16 @@ export default class ServicesStore extends Store { | |||
589 | const delay = 1000; | 589 | const delay = 1000; |
590 | 590 | ||
591 | if (service) { | 591 | if (service) { |
592 | if (service.timer !== null) { | ||
593 | clearTimeout(service.timer); | ||
594 | } | ||
595 | |||
592 | const loop = () => { | 596 | const loop = () => { |
593 | if (!service.webview) return; | 597 | if (!service.webview) return; |
594 | 598 | ||
595 | service.webview.send('poll'); | 599 | service.webview.send('poll'); |
596 | 600 | ||
597 | setTimeout(loop, delay); | 601 | service.timer = setTimeout(loop, delay); |
598 | }; | 602 | }; |
599 | 603 | ||
600 | loop(); | 604 | loop(); |
@@ -2066,9 +2066,9 @@ electron-window-state@^4.1.0: | |||
2066 | jsonfile "^2.2.3" | 2066 | jsonfile "^2.2.3" |
2067 | mkdirp "^0.5.1" | 2067 | mkdirp "^0.5.1" |
2068 | 2068 | ||
2069 | electron@^1.7.9: | 2069 | electron@^1.7.12: |
2070 | version "1.7.9" | 2070 | version "1.7.12" |
2071 | resolved "https://registry.yarnpkg.com/electron/-/electron-1.7.9.tgz#add54e9f8f83ed02f6519ec10135f698b19336cf" | 2071 | resolved "https://registry.yarnpkg.com/electron/-/electron-1.7.12.tgz#dcc61a2c1b0c3df25f68b3425379a01abd01190e" |
2072 | dependencies: | 2072 | dependencies: |
2073 | "@types/node" "^7.0.18" | 2073 | "@types/node" "^7.0.18" |
2074 | electron-download "^3.0.1" | 2074 | electron-download "^3.0.1" |