diff options
author | 2019-09-07 15:50:23 +0200 | |
---|---|---|
committer | 2019-09-07 15:50:23 +0200 | |
commit | e7a74514c1e7c3833dfdcf5900cb87f9e6e8354e (patch) | |
tree | b8314e4155503b135dcb07e8b4a0e847e25c19cf /src/features/todos/containers | |
parent | Update CHANGELOG.md (diff) | |
parent | Update CHANGELOG.md (diff) | |
download | ferdium-app-e7a74514c1e7c3833dfdcf5900cb87f9e6e8354e.tar.gz ferdium-app-e7a74514c1e7c3833dfdcf5900cb87f9e6e8354e.tar.zst ferdium-app-e7a74514c1e7c3833dfdcf5900cb87f9e6e8354e.zip |
Merge branch 'master' of https://github.com/meetfranz/franz into franz-5.3.0
Diffstat (limited to 'src/features/todos/containers')
-rw-r--r-- | src/features/todos/containers/TodosScreen.js | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/features/todos/containers/TodosScreen.js b/src/features/todos/containers/TodosScreen.js new file mode 100644 index 000000000..a5da0b014 --- /dev/null +++ b/src/features/todos/containers/TodosScreen.js | |||
@@ -0,0 +1,41 @@ | |||
1 | import React, { Component } from 'react'; | ||
2 | import { observer, inject } from 'mobx-react'; | ||
3 | import PropTypes from 'prop-types'; | ||
4 | |||
5 | import FeaturesStore from '../../../stores/FeaturesStore'; | ||
6 | import TodosWebview from '../components/TodosWebview'; | ||
7 | import ErrorBoundary from '../../../components/util/ErrorBoundary'; | ||
8 | import { TODOS_MIN_WIDTH, todosStore } from '..'; | ||
9 | import { todoActions } from '../actions'; | ||
10 | |||
11 | @inject('stores', 'actions') @observer | ||
12 | class TodosScreen extends Component { | ||
13 | render() { | ||
14 | if (!todosStore || !todosStore.isFeatureActive || todosStore.isTodosPanelForceHidden) { | ||
15 | return null; | ||
16 | } | ||
17 | |||
18 | return ( | ||
19 | <ErrorBoundary> | ||
20 | <TodosWebview | ||
21 | isVisible={todosStore.isTodosPanelVisible} | ||
22 | togglePanel={todoActions.toggleTodosPanel} | ||
23 | handleClientMessage={todoActions.handleClientMessage} | ||
24 | setTodosWebview={webview => todoActions.setTodosWebview({ webview })} | ||
25 | width={todosStore.width} | ||
26 | minWidth={TODOS_MIN_WIDTH} | ||
27 | resize={width => todoActions.resize({ width })} | ||
28 | isTodosIncludedInCurrentPlan={this.props.stores.features.features.isTodosIncludedInCurrentPlan || false} | ||
29 | /> | ||
30 | </ErrorBoundary> | ||
31 | ); | ||
32 | } | ||
33 | } | ||
34 | |||
35 | export default TodosScreen; | ||
36 | |||
37 | TodosScreen.wrappedComponent.propTypes = { | ||
38 | stores: PropTypes.shape({ | ||
39 | features: PropTypes.instanceOf(FeaturesStore).isRequired, | ||
40 | }).isRequired, | ||
41 | }; | ||