diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/layout/AppLayout.js | 2 | ||||
-rw-r--r-- | src/features/delayApp/Component.js | 8 | ||||
-rw-r--r-- | src/features/delayApp/index.js | 2 | ||||
-rw-r--r-- | src/features/delayApp/styles.js | 49 |
4 files changed, 30 insertions, 31 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index 4b20fc480..3ababe54a 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -5,7 +5,7 @@ import { defineMessages, intlShape } from 'react-intl'; | |||
5 | import { TitleBar } from 'electron-react-titlebar'; | 5 | import { TitleBar } from 'electron-react-titlebar'; |
6 | 6 | ||
7 | import InfoBar from '../ui/InfoBar'; | 7 | import InfoBar from '../ui/InfoBar'; |
8 | import { component as DelayApp } from '../../features/delayApp'; | 8 | import { Component as DelayApp } from '../../features/delayApp'; |
9 | import globalMessages from '../../i18n/globalMessages'; | 9 | import globalMessages from '../../i18n/globalMessages'; |
10 | 10 | ||
11 | import { isWindows } from '../../environment'; | 11 | import { isWindows } from '../../environment'; |
diff --git a/src/features/delayApp/Component.js b/src/features/delayApp/Component.js index 2bfa1162e..403340c7b 100644 --- a/src/features/delayApp/Component.js +++ b/src/features/delayApp/Component.js | |||
@@ -24,7 +24,7 @@ const messages = defineMessages({ | |||
24 | }, | 24 | }, |
25 | }); | 25 | }); |
26 | 26 | ||
27 | export default @inject('actions') @observer @injectSheet(styles) class DelayApp extends Component { | 27 | export default @inject('actions') @injectSheet(styles) @observer class DelayApp extends Component { |
28 | static propTypes = { | 28 | static propTypes = { |
29 | // eslint-disable-next-line | 29 | // eslint-disable-next-line |
30 | classes: PropTypes.object.isRequired, | 30 | classes: PropTypes.object.isRequired, |
@@ -39,8 +39,6 @@ export default @inject('actions') @observer @injectSheet(styles) class DelayApp | |||
39 | } | 39 | } |
40 | 40 | ||
41 | componentDidMount() { | 41 | componentDidMount() { |
42 | // const { reload } = this.props; | ||
43 | |||
44 | this.countdownInterval = setInterval(() => { | 42 | this.countdownInterval = setInterval(() => { |
45 | this.setState({ | 43 | this.setState({ |
46 | countdown: this.state.countdown - this.countdownIntervalTimeout, | 44 | countdown: this.state.countdown - this.countdownIntervalTimeout, |
@@ -53,6 +51,10 @@ export default @inject('actions') @observer @injectSheet(styles) class DelayApp | |||
53 | }, this.countdownIntervalTimeout); | 51 | }, this.countdownIntervalTimeout); |
54 | } | 52 | } |
55 | 53 | ||
54 | componentWillUnmount() { | ||
55 | clearInterval(this.countdownInterval); | ||
56 | } | ||
57 | |||
56 | countdownInterval = null; | 58 | countdownInterval = null; |
57 | countdownIntervalTimeout = 1000; | 59 | countdownIntervalTimeout = 1000; |
58 | 60 | ||
diff --git a/src/features/delayApp/index.js b/src/features/delayApp/index.js index a3cce03ee..910b54959 100644 --- a/src/features/delayApp/index.js +++ b/src/features/delayApp/index.js | |||
@@ -63,5 +63,5 @@ export default function init(stores) { | |||
63 | ); | 63 | ); |
64 | } | 64 | } |
65 | 65 | ||
66 | export const component = DelayAppComponent; | 66 | export const Component = DelayAppComponent; |
67 | 67 | ||
diff --git a/src/features/delayApp/styles.js b/src/features/delayApp/styles.js index 097368d9a..5c214cfdf 100644 --- a/src/features/delayApp/styles.js +++ b/src/features/delayApp/styles.js | |||
@@ -1,26 +1,23 @@ | |||
1 | export default (theme) => { | 1 | export default theme => ({ |
2 | console.log(theme); | 2 | container: { |
3 | return ({ | 3 | background: theme.colorBackground, |
4 | container: { | 4 | position: 'absolute', |
5 | background: theme.colorBackground, | 5 | top: 0, |
6 | position: 'absolute', | 6 | width: '100%', |
7 | top: 0, | 7 | display: 'flex', |
8 | width: '100%', | 8 | 'flex-direction': 'column', |
9 | display: 'flex', | 9 | 'align-items': 'center', |
10 | 'flex-direction': 'column', | 10 | 'justify-content': 'center', |
11 | 'align-items': 'center', | 11 | 'z-index': 150, |
12 | 'justify-content': 'center', | 12 | }, |
13 | 'z-index': 150, | 13 | headline: { |
14 | }, | 14 | color: theme.colorHeadline, |
15 | headline: { | 15 | margin: [25, 0, 40], |
16 | color: theme.colorHeadline, | 16 | 'max-width': 500, |
17 | margin: [25, 0, 40], | 17 | 'text-align': 'center', |
18 | 'max-width': 500, | 18 | 'line-height': '1.3em', |
19 | 'text-align': 'center', | 19 | }, |
20 | 'line-height': '1.3em', | 20 | button: { |
21 | }, | 21 | margin: [40, 0, 20], |
22 | button: { | 22 | }, |
23 | margin: [40, 0, 20], | 23 | }); |
24 | }, | ||
25 | }); | ||
26 | }; | ||