diff options
-rw-r--r-- | src/components/layout/Sidebar.js | 89 |
1 files changed, 45 insertions, 44 deletions
diff --git a/src/components/layout/Sidebar.js b/src/components/layout/Sidebar.js index 4f67a8719..57ba170e8 100644 --- a/src/components/layout/Sidebar.js +++ b/src/components/layout/Sidebar.js | |||
@@ -149,25 +149,31 @@ class Sidebar extends Component { | |||
149 | /> | 149 | /> |
150 | {isLoggedIn ? ( | 150 | {isLoggedIn ? ( |
151 | <> | 151 | <> |
152 | {stores.settings.all.app.lockingFeatureEnabled ? ( | 152 | <button |
153 | <button | 153 | type="button" |
154 | type="button" | 154 | onClick={() => openSettings({ path: 'recipes' })} |
155 | className="sidebar__button" | 155 | className="sidebar__button sidebar__button--new-service" |
156 | onClick={() => { | 156 | data-tip={`${intl.formatMessage( |
157 | actions.settings.update({ | 157 | messages.addNewService, |
158 | type: 'app', | 158 | )} (${addNewServiceShortcutKey(false)})`} |
159 | data: { | 159 | > |
160 | locked: true, | 160 | <Icon icon={mdiPlusBox} size={1.5} /> |
161 | }, | 161 | </button> |
162 | }); | 162 | <button |
163 | }} | 163 | type="button" |
164 | data-tip={`${intl.formatMessage( | 164 | onClick={() => { |
165 | messages.lockFerdi, | 165 | toggleWorkspaceDrawer(); |
166 | )} (${lockFerdiShortcutKey(false)})`} | 166 | this.updateToolTip(); |
167 | > | 167 | }} |
168 | <Icon icon={mdiLock} size={1.5} /> | 168 | className={`sidebar__button sidebar__button--workspaces ${ |
169 | </button> | 169 | isWorkspaceDrawerOpen ? 'is-active' : '' |
170 | ) : null} | 170 | }`} |
171 | data-tip={`${intl.formatMessage( | ||
172 | workspaceToggleMessage, | ||
173 | )} (${workspaceToggleShortcutKey(false)})`} | ||
174 | > | ||
175 | <Icon icon={mdiViewGrid} size={1.5} /> | ||
176 | </button> | ||
171 | {todosStore.isFeatureEnabledByUser ? ( | 177 | {todosStore.isFeatureEnabledByUser ? ( |
172 | <button | 178 | <button |
173 | type="button" | 179 | type="button" |
@@ -189,21 +195,6 @@ class Sidebar extends Component { | |||
189 | <button | 195 | <button |
190 | type="button" | 196 | type="button" |
191 | onClick={() => { | 197 | onClick={() => { |
192 | toggleWorkspaceDrawer(); | ||
193 | this.updateToolTip(); | ||
194 | }} | ||
195 | className={`sidebar__button sidebar__button--workspaces ${ | ||
196 | isWorkspaceDrawerOpen ? 'is-active' : '' | ||
197 | }`} | ||
198 | data-tip={`${intl.formatMessage( | ||
199 | workspaceToggleMessage, | ||
200 | )} (${workspaceToggleShortcutKey(false)})`} | ||
201 | > | ||
202 | <Icon icon={mdiViewGrid} size={1.5} /> | ||
203 | </button> | ||
204 | <button | ||
205 | type="button" | ||
206 | onClick={() => { | ||
207 | toggleMuteApp(); | 198 | toggleMuteApp(); |
208 | this.updateToolTip(); | 199 | this.updateToolTip(); |
209 | }} | 200 | }} |
@@ -216,16 +207,26 @@ class Sidebar extends Component { | |||
216 | > | 207 | > |
217 | <Icon icon={isAppMuted ? mdiBellOff : mdiBell} size={1.5} /> | 208 | <Icon icon={isAppMuted ? mdiBellOff : mdiBell} size={1.5} /> |
218 | </button> | 209 | </button> |
219 | <button | 210 | |
220 | type="button" | 211 | {stores.settings.all.app.lockingFeatureEnabled ? ( |
221 | onClick={() => openSettings({ path: 'recipes' })} | 212 | <button |
222 | className="sidebar__button sidebar__button--new-service" | 213 | type="button" |
223 | data-tip={`${intl.formatMessage( | 214 | className="sidebar__button" |
224 | messages.addNewService, | 215 | onClick={() => { |
225 | )} (${addNewServiceShortcutKey(false)})`} | 216 | actions.settings.update({ |
226 | > | 217 | type: 'app', |
227 | <Icon icon={mdiPlusBox} size={1.5} /> | 218 | data: { |
228 | </button> | 219 | locked: true, |
220 | }, | ||
221 | }); | ||
222 | }} | ||
223 | data-tip={`${intl.formatMessage( | ||
224 | messages.lockFerdi, | ||
225 | )} (${lockFerdiShortcutKey(false)})`} | ||
226 | > | ||
227 | <Icon icon={mdiLock} size={1.5} /> | ||
228 | </button> | ||
229 | ) : null} | ||
229 | </> | 230 | </> |
230 | ) : ( | 231 | ) : ( |
231 | <Link | 232 | <Link |