diff options
author | 2019-08-09 11:14:30 +0200 | |
---|---|---|
committer | 2019-08-09 11:14:30 +0200 | |
commit | 9ede7021a8fabafc8c43183057fb8b7d440f6ebd (patch) | |
tree | 4b17d8dfc384f5c5dadb56fff0ace9cc16f26475 /src/features | |
parent | send franz config to todos webview on init (diff) | |
download | ferdium-app-9ede7021a8fabafc8c43183057fb8b7d440f6ebd.tar.gz ferdium-app-9ede7021a8fabafc8c43183057fb8b7d440f6ebd.tar.zst ferdium-app-9ede7021a8fabafc8c43183057fb8b7d440f6ebd.zip |
Remove auth token url parameter
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/todos/components/TodosWebview.js | 5 | ||||
-rw-r--r-- | src/features/todos/containers/TodosScreen.js | 17 |
2 files changed, 5 insertions, 17 deletions
diff --git a/src/features/todos/components/TodosWebview.js b/src/features/todos/components/TodosWebview.js index 819e599ca..d171bbd0a 100644 --- a/src/features/todos/components/TodosWebview.js +++ b/src/features/todos/components/TodosWebview.js | |||
@@ -75,7 +75,6 @@ const styles = theme => ({ | |||
75 | class TodosWebview extends Component { | 75 | class TodosWebview extends Component { |
76 | static propTypes = { | 76 | static propTypes = { |
77 | classes: PropTypes.object.isRequired, | 77 | classes: PropTypes.object.isRequired, |
78 | authToken: PropTypes.string.isRequired, | ||
79 | isVisible: PropTypes.bool.isRequired, | 78 | isVisible: PropTypes.bool.isRequired, |
80 | togglePanel: PropTypes.func.isRequired, | 79 | togglePanel: PropTypes.func.isRequired, |
81 | handleClientMessage: PropTypes.func.isRequired, | 80 | handleClientMessage: PropTypes.func.isRequired, |
@@ -166,7 +165,7 @@ class TodosWebview extends Component { | |||
166 | 165 | ||
167 | render() { | 166 | render() { |
168 | const { | 167 | const { |
169 | authToken, classes, isVisible, togglePanel, | 168 | classes, isVisible, togglePanel, |
170 | } = this.props; | 169 | } = this.props; |
171 | const { width, delta, isDragging } = this.state; | 170 | const { width, delta, isDragging } = this.state; |
172 | 171 | ||
@@ -206,7 +205,7 @@ class TodosWebview extends Component { | |||
206 | partition="persist:todos" | 205 | partition="persist:todos" |
207 | preload="./features/todos/preload.js" | 206 | preload="./features/todos/preload.js" |
208 | ref={(webview) => { this.webview = webview ? webview.view : null; }} | 207 | ref={(webview) => { this.webview = webview ? webview.view : null; }} |
209 | src={`${environment.TODOS_FRONTEND}?authToken=${authToken}`} | 208 | src={environment.TODOS_FRONTEND} |
210 | /> | 209 | /> |
211 | </div> | 210 | </div> |
212 | </> | 211 | </> |
diff --git a/src/features/todos/containers/TodosScreen.js b/src/features/todos/containers/TodosScreen.js index 48acd19f4..d071d0677 100644 --- a/src/features/todos/containers/TodosScreen.js +++ b/src/features/todos/containers/TodosScreen.js | |||
@@ -1,32 +1,21 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component } from 'react'; |
2 | import { inject, observer } from 'mobx-react'; | 2 | import { observer } from 'mobx-react'; |
3 | import PropTypes from 'prop-types'; | ||
4 | 3 | ||
5 | import TodosWebview from '../components/TodosWebview'; | 4 | import TodosWebview from '../components/TodosWebview'; |
6 | import ErrorBoundary from '../../../components/util/ErrorBoundary'; | 5 | import ErrorBoundary from '../../../components/util/ErrorBoundary'; |
7 | import UserStore from '../../../stores/UserStore'; | ||
8 | import { TODOS_MIN_WIDTH, todosStore } from '..'; | 6 | import { TODOS_MIN_WIDTH, todosStore } from '..'; |
9 | import { todoActions } from '../actions'; | 7 | import { todoActions } from '../actions'; |
10 | 8 | ||
11 | @inject('stores') @observer | 9 | @observer |
12 | class TodosScreen extends Component { | 10 | class TodosScreen extends Component { |
13 | static propTypes = { | ||
14 | stores: PropTypes.shape({ | ||
15 | user: PropTypes.instanceOf(UserStore).isRequired, | ||
16 | }).isRequired, | ||
17 | }; | ||
18 | |||
19 | render() { | 11 | render() { |
20 | const { stores } = this.props; | 12 | if (!todosStore || !todosStore.isFeatureActive) { |
21 | |||
22 | if (!stores.todos || !stores.todos.isFeatureActive) { | ||
23 | return null; | 13 | return null; |
24 | } | 14 | } |
25 | 15 | ||
26 | return ( | 16 | return ( |
27 | <ErrorBoundary> | 17 | <ErrorBoundary> |
28 | <TodosWebview | 18 | <TodosWebview |
29 | authToken={stores.user.authToken} | ||
30 | isVisible={todosStore.isTodosPanelVisible} | 19 | isVisible={todosStore.isTodosPanelVisible} |
31 | togglePanel={todoActions.toggleTodosPanel} | 20 | togglePanel={todoActions.toggleTodosPanel} |
32 | handleClientMessage={todoActions.handleClientMessage} | 21 | handleClientMessage={todoActions.handleClientMessage} |