diff options
Diffstat (limited to 'src/features/todos/components')
-rw-r--r-- | src/features/todos/components/TodosWebview.js | 10 |
1 files changed, 7 insertions, 3 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> |