aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/todos
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-09-11 13:46:00 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-09-11 13:46:00 +0200
commit7ffcf8cf417e76fe1206b945d417095534b3cad8 (patch)
tree11a24772a516e23d278565cbebc4dc7a44735969 /src/features/todos
parentFix(Todos): Fix Todos Menu (diff)
downloadferdium-app-7ffcf8cf417e76fe1206b945d417095534b3cad8.tar.gz
ferdium-app-7ffcf8cf417e76fe1206b945d417095534b3cad8.tar.zst
ferdium-app-7ffcf8cf417e76fe1206b945d417095534b3cad8.zip
feat(Todos): Move todos toggle to sidebar
Diffstat (limited to 'src/features/todos')
-rw-r--r--src/features/todos/components/TodosWebview.js53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/features/todos/components/TodosWebview.js b/src/features/todos/components/TodosWebview.js
index c06183e37..aed1a8834 100644
--- a/src/features/todos/components/TodosWebview.js
+++ b/src/features/todos/components/TodosWebview.js
@@ -61,50 +61,6 @@ const styles = theme => ({
61 background: theme.todos.dragIndicator.background, 61 background: theme.todos.dragIndicator.background,
62 62
63 }, 63 },
64 openTodosButton: {
65 width: OPEN_TODOS_BUTTON_SIZE,
66 height: OPEN_TODOS_BUTTON_SIZE,
67 background: theme.todos.toggleButton.background,
68 position: 'absolute',
69 bottom: 120,
70 right: props => (props.width + (props.isVisible ? -OPEN_TODOS_BUTTON_SIZE / 2 : 0)),
71 borderRadius: OPEN_TODOS_BUTTON_SIZE / 2,
72 opacity: props => (props.isVisible ? 0 : 1),
73 transition: 'right 0.5s',
74 zIndex: 600,
75 display: 'flex',
76 alignItems: 'center',
77 justifyContent: 'center',
78 boxShadow: [0, 0, 10, theme.todos.toggleButton.shadowColor],
79
80 borderTopRightRadius: props => (props.isVisible ? null : 0),
81 borderBottomRightRadius: props => (props.isVisible ? null : 0),
82
83 '& svg': {
84 fill: theme.todos.toggleButton.textColor,
85 transition: 'all 0.5s',
86 },
87 },
88 closeTodosButton: {
89 width: CLOSE_TODOS_BUTTON_SIZE,
90 height: CLOSE_TODOS_BUTTON_SIZE,
91 background: theme.todos.toggleButton.background,
92 position: 'absolute',
93 bottom: 120,
94 right: ({ width }) => (width + -CLOSE_TODOS_BUTTON_SIZE / 2),
95 borderRadius: CLOSE_TODOS_BUTTON_SIZE / 2,
96 opacity: ({ isTodosIncludedInCurrentPlan }) => (!isTodosIncludedInCurrentPlan ? 1 : 0),
97 transition: 'opacity 0.5s',
98 zIndex: 600,
99 display: 'flex',
100 alignItems: 'center',
101 justifyContent: 'center',
102 boxShadow: [0, 0, 10, theme.todos.toggleButton.shadowColor],
103
104 '& svg': {
105 fill: theme.todos.toggleButton.textColor,
106 },
107 },
108 premiumContainer: { 64 premiumContainer: {
109 display: 'flex', 65 display: 'flex',
110 flexDirection: 'column', 66 flexDirection: 'column',
@@ -132,7 +88,6 @@ class TodosWebview extends Component {
132 static propTypes = { 88 static propTypes = {
133 classes: PropTypes.object.isRequired, 89 classes: PropTypes.object.isRequired,
134 isVisible: PropTypes.bool.isRequired, 90 isVisible: PropTypes.bool.isRequired,
135 togglePanel: PropTypes.func.isRequired,
136 handleClientMessage: PropTypes.func.isRequired, 91 handleClientMessage: PropTypes.func.isRequired,
137 setTodosWebview: PropTypes.func.isRequired, 92 setTodosWebview: PropTypes.func.isRequired,
138 resize: PropTypes.func.isRequired, 93 resize: PropTypes.func.isRequired,
@@ -228,7 +183,6 @@ class TodosWebview extends Component {
228 const { 183 const {
229 classes, 184 classes,
230 isVisible, 185 isVisible,
231 togglePanel,
232 isTodosIncludedInCurrentPlan, 186 isTodosIncludedInCurrentPlan,
233 } = this.props; 187 } = this.props;
234 188
@@ -247,13 +201,6 @@ class TodosWebview extends Component {
247 onMouseUp={() => this.stopResize()} 201 onMouseUp={() => this.stopResize()}
248 ref={(node) => { this.node = node; }} 202 ref={(node) => { this.node = node; }}
249 > 203 >
250 <button
251 onClick={() => togglePanel()}
252 className={isVisible ? classes.closeTodosButton : classes.openTodosButton}
253 type="button"
254 >
255 <Icon icon={isVisible ? mdiChevronRight : mdiCheckAll} size={2} />
256 </button>
257 <div 204 <div
258 className={classes.resizeHandler} 205 className={classes.resizeHandler}
259 style={Object.assign({ left: delta }, isDragging ? { width: 600, marginLeft: -200 } : {})} // This hack is required as resizing with webviews beneath behaves quite bad 206 style={Object.assign({ left: delta }, isDragging ? { width: 600, marginLeft: -200 } : {})} // This hack is required as resizing with webviews beneath behaves quite bad