diff options
author | 2023-07-21 10:52:49 +0530 | |
---|---|---|
committer | 2023-07-21 10:52:49 +0530 | |
commit | d348bc10ea600d70ee006316fdcb56eb1dba457b (patch) | |
tree | 4d72b183c92d70b442b23e4d98cde2c4242002e2 /src/components/layout | |
parent | 6.4.1-nightly.8 [skip ci] (diff) | |
download | ferdium-app-d348bc10ea600d70ee006316fdcb56eb1dba457b.tar.gz ferdium-app-d348bc10ea600d70ee006316fdcb56eb1dba457b.tar.zst ferdium-app-d348bc10ea600d70ee006316fdcb56eb1dba457b.zip |
Revert "update react-router-dom to version 6.14.1"
and "update react-router-dom,react-tooltip& react-transition-group"
This reverts commit 0a4a0497bb630dc85cfa0145d57f954feb9c052a and 345fd98dc52a3b7f0d69022b6a19818e559e4557.
Diffstat (limited to 'src/components/layout')
-rw-r--r-- | src/components/layout/Sidebar.tsx | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index 2b1e87023..fac424477 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component } from 'react'; | 1 | import { Component } from 'react'; |
2 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | 2 | import ReactTooltip from 'react-tooltip'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; |
4 | import { inject, observer } from 'mobx-react'; | 4 | import { inject, observer } from 'mobx-react'; |
5 | import { | 5 | import { |
@@ -123,6 +123,10 @@ class Sidebar extends Component<IProps, IState> { | |||
123 | }; | 123 | }; |
124 | } | 124 | } |
125 | 125 | ||
126 | componentDidUpdate() { | ||
127 | ReactTooltip.rebuild(); | ||
128 | } | ||
129 | |||
126 | enableToolTip() { | 130 | enableToolTip() { |
127 | this.setState({ tooltipEnabled: true }); | 131 | this.setState({ tooltipEnabled: true }); |
128 | } | 132 | } |
@@ -228,8 +232,7 @@ class Sidebar extends Component<IProps, IState> { | |||
228 | type="button" | 232 | type="button" |
229 | onClick={() => openSettings({ path: 'recipes' })} | 233 | onClick={() => openSettings({ path: 'recipes' })} |
230 | className="sidebar__button sidebar__button--new-service" | 234 | className="sidebar__button sidebar__button--new-service" |
231 | data-tooltip-id="tooltip-sidebar-button" | 235 | data-tip={`${intl.formatMessage( |
232 | data-tooltip-content={`${intl.formatMessage( | ||
233 | messages.addNewService, | 236 | messages.addNewService, |
234 | )} (${addNewServiceShortcutKey(false)})`} | 237 | )} (${addNewServiceShortcutKey(false)})`} |
235 | > | 238 | > |
@@ -248,8 +251,7 @@ class Sidebar extends Component<IProps, IState> { | |||
248 | }); | 251 | }); |
249 | }} | 252 | }} |
250 | className="sidebar__button sidebar__button--split-mode-toggle" | 253 | className="sidebar__button sidebar__button--split-mode-toggle" |
251 | data-tooltip-id="tooltip-sidebar-button" | 254 | data-tip={`${intl.formatMessage( |
252 | data-tooltip-content={`${intl.formatMessage( | ||
253 | messages.splitModeToggle, | 255 | messages.splitModeToggle, |
254 | )} (${splitModeToggleShortcutKey(false)})`} | 256 | )} (${splitModeToggleShortcutKey(false)})`} |
255 | > | 257 | > |
@@ -266,8 +268,7 @@ class Sidebar extends Component<IProps, IState> { | |||
266 | className={`sidebar__button sidebar__button--workspaces ${ | 268 | className={`sidebar__button sidebar__button--workspaces ${ |
267 | isWorkspaceDrawerOpen ? 'is-active' : '' | 269 | isWorkspaceDrawerOpen ? 'is-active' : '' |
268 | }`} | 270 | }`} |
269 | data-tooltip-id="tooltip-sidebar-button" | 271 | data-tip={`${intl.formatMessage( |
270 | data-tooltip-content={`${intl.formatMessage( | ||
271 | workspaceToggleMessage, | 272 | workspaceToggleMessage, |
272 | )} (${workspaceToggleShortcutKey(false)})`} | 273 | )} (${workspaceToggleShortcutKey(false)})`} |
273 | > | 274 | > |
@@ -284,8 +285,7 @@ class Sidebar extends Component<IProps, IState> { | |||
284 | className={`sidebar__button sidebar__button--audio ${ | 285 | className={`sidebar__button sidebar__button--audio ${ |
285 | isAppMuted ? 'is-muted' : '' | 286 | isAppMuted ? 'is-muted' : '' |
286 | }`} | 287 | }`} |
287 | data-tooltip-id="tooltip-sidebar-button" | 288 | data-tip={`${intl.formatMessage( |
288 | data-tooltip-content={`${intl.formatMessage( | ||
289 | isAppMuted ? messages.unmute : messages.mute, | 289 | isAppMuted ? messages.unmute : messages.mute, |
290 | )} (${muteFerdiumShortcutKey(false)})`} | 290 | )} (${muteFerdiumShortcutKey(false)})`} |
291 | > | 291 | > |
@@ -303,8 +303,7 @@ class Sidebar extends Component<IProps, IState> { | |||
303 | className={`sidebar__button sidebar__button--todos ${ | 303 | className={`sidebar__button sidebar__button--todos ${ |
304 | todosStore.isTodosPanelVisible ? 'is-active' : '' | 304 | todosStore.isTodosPanelVisible ? 'is-active' : '' |
305 | }`} | 305 | }`} |
306 | data-tooltip-id="tooltip-sidebar-button" | 306 | data-tip={`${intl.formatMessage( |
307 | data-tooltip-content={`${intl.formatMessage( | ||
308 | todosToggleMessage, | 307 | todosToggleMessage, |
309 | )} (${todosToggleShortcutKey(false)})`} | 308 | )} (${todosToggleShortcutKey(false)})`} |
310 | > | 309 | > |
@@ -323,8 +322,7 @@ class Sidebar extends Component<IProps, IState> { | |||
323 | }, | 322 | }, |
324 | }); | 323 | }); |
325 | }} | 324 | }} |
326 | data-tooltip-id="tooltip-sidebar-button" | 325 | data-tip={`${intl.formatMessage( |
327 | data-tooltip-content={`${intl.formatMessage( | ||
328 | messages.lockFerdium, | 326 | messages.lockFerdium, |
329 | )} (${lockFerdiumShortcutKey(false)})`} | 327 | )} (${lockFerdiumShortcutKey(false)})`} |
330 | > | 328 | > |
@@ -333,20 +331,14 @@ class Sidebar extends Component<IProps, IState> { | |||
333 | ) : null} | 331 | ) : null} |
334 | </> | 332 | </> |
335 | {this.state.tooltipEnabled && ( | 333 | {this.state.tooltipEnabled && ( |
336 | <ReactTooltip | 334 | <ReactTooltip place="right" type="dark" effect="solid" /> |
337 | id="tooltip-sidebar-button" | ||
338 | place="right" | ||
339 | variant="dark" | ||
340 | style={{ height: 'auto', overflowY: 'unset' }} | ||
341 | /> | ||
342 | )} | 335 | )} |
343 | {!hideSettingsButton && !isMenuCollapsed ? ( | 336 | {!hideSettingsButton && !isMenuCollapsed ? ( |
344 | <button | 337 | <button |
345 | type="button" | 338 | type="button" |
346 | onClick={() => openSettings({ path: 'app' })} | 339 | onClick={() => openSettings({ path: 'app' })} |
347 | className="sidebar__button sidebar__button--settings" | 340 | className="sidebar__button sidebar__button--settings" |
348 | data-tooltip-id="tooltip-sidebar-button" | 341 | data-tip={`${intl.formatMessage( |
349 | data-tooltip-content={`${intl.formatMessage( | ||
350 | globalMessages.settings, | 342 | globalMessages.settings, |
351 | )} (${settingsShortcutKey(false)})`} | 343 | )} (${settingsShortcutKey(false)})`} |
352 | > | 344 | > |