diff options
Diffstat (limited to 'src/features/todos')
-rw-r--r-- | src/features/todos/components/TodosWebview.js | 10 | ||||
-rw-r--r-- | src/features/todos/containers/TodosScreen.js | 2 | ||||
-rw-r--r-- | src/features/todos/index.js | 2 | ||||
-rw-r--r-- | src/features/todos/preload.js | 2 | ||||
-rw-r--r-- | src/features/todos/store.js | 2 |
5 files changed, 11 insertions, 7 deletions
diff --git a/src/features/todos/components/TodosWebview.js b/src/features/todos/components/TodosWebview.js index d052da6f2..d4271dba0 100644 --- a/src/features/todos/components/TodosWebview.js +++ b/src/features/todos/components/TodosWebview.js | |||
@@ -1,6 +1,6 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component } from 'react'; |
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { observer } from 'mobx-react'; | 3 | import { observer, inject } from 'mobx-react'; |
4 | import injectSheet from 'react-jss'; | 4 | import injectSheet from 'react-jss'; |
5 | import Webview from 'react-electron-web-view'; | 5 | import Webview from 'react-electron-web-view'; |
6 | import { Icon } from '@meetfranz/ui'; | 6 | import { Icon } from '@meetfranz/ui'; |
@@ -80,7 +80,7 @@ const styles = theme => ({ | |||
80 | }, | 80 | }, |
81 | }); | 81 | }); |
82 | 82 | ||
83 | @injectSheet(styles) @observer | 83 | @injectSheet(styles) @observer @inject('stores') |
84 | class TodosWebview extends Component { | 84 | class TodosWebview extends Component { |
85 | static propTypes = { | 85 | static propTypes = { |
86 | classes: PropTypes.object.isRequired, | 86 | classes: PropTypes.object.isRequired, |
@@ -91,6 +91,9 @@ class TodosWebview extends Component { | |||
91 | width: PropTypes.number.isRequired, | 91 | width: PropTypes.number.isRequired, |
92 | minWidth: PropTypes.number.isRequired, | 92 | minWidth: PropTypes.number.isRequired, |
93 | isTodosIncludedInCurrentPlan: PropTypes.bool.isRequired, | 93 | isTodosIncludedInCurrentPlan: PropTypes.bool.isRequired, |
94 | stores: PropTypes.shape({ | ||
95 | settings: PropTypes.instanceOf(SettingsStore).isRequired, | ||
96 | }).isRequired, | ||
94 | }; | 97 | }; |
95 | 98 | ||
96 | state = { | 99 | state = { |
@@ -181,6 +184,7 @@ class TodosWebview extends Component { | |||
181 | classes, | 184 | classes, |
182 | isVisible, | 185 | isVisible, |
183 | isTodosIncludedInCurrentPlan, | 186 | isTodosIncludedInCurrentPlan, |
187 | stores, | ||
184 | } = this.props; | 188 | } = this.props; |
185 | 189 | ||
186 | const { | 190 | const { |
@@ -220,7 +224,7 @@ class TodosWebview extends Component { | |||
220 | partition="persist:todos" | 224 | partition="persist:todos" |
221 | preload="./features/todos/preload.js" | 225 | preload="./features/todos/preload.js" |
222 | ref={(webview) => { this.webview = webview ? webview.view : null; }} | 226 | ref={(webview) => { this.webview = webview ? webview.view : null; }} |
223 | src={environment.TODOS_FRONTEND} | 227 | src={stores.settings.all.app.todoServer || environment.TODOS_FRONTEND} |
224 | /> | 228 | /> |
225 | ) : ( | 229 | ) : ( |
226 | <Appear> | 230 | <Appear> |
diff --git a/src/features/todos/containers/TodosScreen.js b/src/features/todos/containers/TodosScreen.js index a5da0b014..bc05a587d 100644 --- a/src/features/todos/containers/TodosScreen.js +++ b/src/features/todos/containers/TodosScreen.js | |||
@@ -25,7 +25,7 @@ class TodosScreen extends Component { | |||
25 | width={todosStore.width} | 25 | width={todosStore.width} |
26 | minWidth={TODOS_MIN_WIDTH} | 26 | minWidth={TODOS_MIN_WIDTH} |
27 | resize={width => todoActions.resize({ width })} | 27 | resize={width => todoActions.resize({ width })} |
28 | isTodosIncludedInCurrentPlan={this.props.stores.features.features.isTodosIncludedInCurrentPlan || false} | 28 | isTodosIncludedInCurrentPlan |
29 | /> | 29 | /> |
30 | </ErrorBoundary> | 30 | </ErrorBoundary> |
31 | ); | 31 | ); |
diff --git a/src/features/todos/index.js b/src/features/todos/index.js index 7388aebaf..9f355e9ba 100644 --- a/src/features/todos/index.js +++ b/src/features/todos/index.js | |||
@@ -1,7 +1,7 @@ | |||
1 | import { reaction } from 'mobx'; | 1 | import { reaction } from 'mobx'; |
2 | import TodoStore from './store'; | 2 | import TodoStore from './store'; |
3 | 3 | ||
4 | const debug = require('debug')('Franz:feature:todos'); | 4 | const debug = require('debug')('Ferdi:feature:todos'); |
5 | 5 | ||
6 | export const GA_CATEGORY_TODOS = 'Todos'; | 6 | export const GA_CATEGORY_TODOS = 'Todos'; |
7 | 7 | ||
diff --git a/src/features/todos/preload.js b/src/features/todos/preload.js index 6e38a2ef3..412b775af 100644 --- a/src/features/todos/preload.js +++ b/src/features/todos/preload.js | |||
@@ -1,7 +1,7 @@ | |||
1 | import { ipcRenderer } from 'electron'; | 1 | import { ipcRenderer } from 'electron'; |
2 | import { IPC } from './constants'; | 2 | import { IPC } from './constants'; |
3 | 3 | ||
4 | const debug = require('debug')('Franz:feature:todos:preload'); | 4 | const debug = require('debug')('Ferdi:feature:todos:preload'); |
5 | 5 | ||
6 | debug('Preloading Todos Webview'); | 6 | debug('Preloading Todos Webview'); |
7 | 7 | ||
diff --git a/src/features/todos/store.js b/src/features/todos/store.js index abf176604..d507237d1 100644 --- a/src/features/todos/store.js +++ b/src/features/todos/store.js | |||
@@ -16,7 +16,7 @@ import { | |||
16 | import { IPC } from './constants'; | 16 | import { IPC } from './constants'; |
17 | import { state as delayAppState } from '../delayApp'; | 17 | import { state as delayAppState } from '../delayApp'; |
18 | 18 | ||
19 | const debug = require('debug')('Franz:feature:todos:store'); | 19 | const debug = require('debug')('Ferdi:feature:todos:store'); |
20 | 20 | ||
21 | export default class TodoStore extends FeatureStore { | 21 | export default class TodoStore extends FeatureStore { |
22 | @observable isFeatureEnabled = false; | 22 | @observable isFeatureEnabled = false; |