aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/layout/Sidebar.js
diff options
context:
space:
mode:
authorLibravatar vantezzen <properly@protonmail.com>2019-09-13 18:08:29 +0200
committerLibravatar vantezzen <properly@protonmail.com>2019-09-13 18:08:29 +0200
commitf5d17ec2348a12fb4b494bf79d0c52065493bd75 (patch)
tree2a8c6156dbd6f23c0f20cd0b1f9f0bcd6d1ee50f /src/components/layout/Sidebar.js
parentMerge Franz 5.3.2 (diff)
downloadferdium-app-f5d17ec2348a12fb4b494bf79d0c52065493bd75.tar.gz
ferdium-app-f5d17ec2348a12fb4b494bf79d0c52065493bd75.tar.zst
ferdium-app-f5d17ec2348a12fb4b494bf79d0c52065493bd75.zip
Fix merge errors
Diffstat (limited to 'src/components/layout/Sidebar.js')
-rw-r--r--src/components/layout/Sidebar.js101
1 files changed, 57 insertions, 44 deletions
diff --git a/src/components/layout/Sidebar.js b/src/components/layout/Sidebar.js
index 4bc6feb15..729bd35af 100644
--- a/src/components/layout/Sidebar.js
+++ b/src/components/layout/Sidebar.js
@@ -9,6 +9,7 @@ import Tabbar from '../services/tabs/Tabbar';
9import { ctrlKey } from '../../environment'; 9import { ctrlKey } from '../../environment';
10import { workspaceStore } from '../../features/workspaces'; 10import { workspaceStore } from '../../features/workspaces';
11import { todosStore } from '../../features/todos'; 11import { todosStore } from '../../features/todos';
12import { todoActions } from '../../features/todos/actions';
12 13
13const messages = defineMessages({ 14const messages = defineMessages({
14 settings: { 15 settings: {
@@ -104,51 +105,63 @@ export default @observer class Sidebar extends Component {
104 enableToolTip={() => this.enableToolTip()} 105 enableToolTip={() => this.enableToolTip()}
105 disableToolTip={() => this.disableToolTip()} 106 disableToolTip={() => this.disableToolTip()}
106 /> 107 />
107 {todosStore.isFeatureEnabled && todosStore.isFeatureEnabledByUser ? ( 108 { isLoggedIn ? (
108 <button 109 <>
109 type="button" 110 {todosStore.isFeatureEnabled && todosStore.isFeatureEnabledByUser ? (
110 onClick={() => { 111 <button
111 todoActions.toggleTodosPanel(); 112 type="button"
112 this.updateToolTip(); 113 onClick={() => {
113 }} 114 todoActions.toggleTodosPanel();
114 className="sidebar__button sidebar__button--workspaces" 115 this.updateToolTip();
115 data-tip={`${intl.formatMessage(todosToggleMessage)} (${ctrlKey}+T)`} 116 }}
117 className="sidebar__button sidebar__button--workspaces"
118 data-tip={`${intl.formatMessage(todosToggleMessage)} (${ctrlKey}+T)`}
119 >
120 <i className="mdi mdi-check-all" />
121 </button>
122 ) : null}
123 {workspaceStore.isFeatureEnabled ? (
124 <button
125 type="button"
126 onClick={() => {
127 toggleWorkspaceDrawer();
128 this.updateToolTip();
129 }}
130 className={`sidebar__button sidebar__button--workspaces ${isWorkspaceDrawerOpen ? 'is-active' : ''}`}
131 data-tip={`${intl.formatMessage(workspaceToggleMessage)} (${ctrlKey}+D)`}
132 >
133 <i className="mdi mdi-view-grid" />
134 </button>
135 ) : null}
136 <button
137 type="button"
138 onClick={() => {
139 toggleMuteApp();
140 this.updateToolTip();
141 }}
142 className={`sidebar__button sidebar__button--audio ${isAppMuted ? 'is-muted' : ''}`}
143 data-tip={`${intl.formatMessage(isAppMuted ? messages.unmute : messages.mute)} (${ctrlKey}+Shift+M)`}
144 >
145 <i className={`mdi mdi-bell${isAppMuted ? '-off' : ''}`} />
146 </button>
147 <button
148 type="button"
149 onClick={() => openSettings({ path: 'recipes' })}
150 className="sidebar__button sidebar__button--new-service"
151 data-tip={`${intl.formatMessage(messages.addNewService)} (${ctrlKey}+N)`}
152 >
153 <i className="mdi mdi-plus-box" />
154 </button>
155 </>
156 ) : (
157 <Link
158 to="/auth/welcome"
159 className="sidebar__button sidebar__button--new-service"
160 data-tip="Login"
116 > 161 >
117 <i className="mdi mdi-check-all" /> 162 <i className="mdi mdi-login-variant" />
118 </button> 163 </Link>
119 ) : null} 164 )}
120 {workspaceStore.isFeatureEnabled ? (
121 <button
122 type="button"
123 onClick={() => {
124 toggleWorkspaceDrawer();
125 this.updateToolTip();
126 }}
127 className={`sidebar__button sidebar__button--workspaces ${isWorkspaceDrawerOpen ? 'is-active' : ''}`}
128 data-tip={`${intl.formatMessage(workspaceToggleMessage)} (${ctrlKey}+D)`}
129 >
130 <i className="mdi mdi-view-grid" />
131 </button>
132 ) : null}
133 <button
134 type="button"
135 onClick={() => {
136 toggleMuteApp();
137 this.updateToolTip();
138 }}
139 className={`sidebar__button sidebar__button--audio ${isAppMuted ? 'is-muted' : ''}`}
140 data-tip={`${intl.formatMessage(isAppMuted ? messages.unmute : messages.mute)} (${ctrlKey}+Shift+M)`}
141 >
142 <i className={`mdi mdi-bell${isAppMuted ? '-off' : ''}`} />
143 </button>
144 <button
145 type="button"
146 onClick={() => openSettings({ path: 'recipes' })}
147 className="sidebar__button sidebar__button--new-service"
148 data-tip={`${intl.formatMessage(messages.addNewService)} (${ctrlKey}+N)`}
149 >
150 <i className="mdi mdi-plus-box" />
151 </button>
152 <button 165 <button
153 type="button" 166 type="button"
154 onClick={() => openSettings({ path: 'app' })} 167 onClick={() => openSettings({ path: 'app' })}