aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/todos/containers/TodosScreen.js
diff options
context:
space:
mode:
authorLibravatar vantezzen <properly@protonmail.com>2019-09-07 15:50:23 +0200
committerLibravatar vantezzen <properly@protonmail.com>2019-09-07 15:50:23 +0200
commite7a74514c1e7c3833dfdcf5900cb87f9e6e8354e (patch)
treeb8314e4155503b135dcb07e8b4a0e847e25c19cf /src/features/todos/containers/TodosScreen.js
parentUpdate CHANGELOG.md (diff)
parentUpdate CHANGELOG.md (diff)
downloadferdium-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/TodosScreen.js')
-rw-r--r--src/features/todos/containers/TodosScreen.js41
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 @@
1import React, { Component } from 'react';
2import { observer, inject } from 'mobx-react';
3import PropTypes from 'prop-types';
4
5import FeaturesStore from '../../../stores/FeaturesStore';
6import TodosWebview from '../components/TodosWebview';
7import ErrorBoundary from '../../../components/util/ErrorBoundary';
8import { TODOS_MIN_WIDTH, todosStore } from '..';
9import { todoActions } from '../actions';
10
11@inject('stores', 'actions') @observer
12class 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
35export default TodosScreen;
36
37TodosScreen.wrappedComponent.propTypes = {
38 stores: PropTypes.shape({
39 features: PropTypes.instanceOf(FeaturesStore).isRequired,
40 }).isRequired,
41};