diff options
author | 2021-10-28 13:53:22 +0200 | |
---|---|---|
committer | 2021-10-28 13:53:22 +0200 | |
commit | 59d665af9d4c2dc505e5d5267b02b1df96e90a7d (patch) | |
tree | 7ae3acd32a0c94a2b157bfebdee3d479ffc6f5d1 /src/components/layout/Sidebar.js | |
parent | New Crowdin updates (#2154) [skip ci] (diff) | |
download | ferdium-app-59d665af9d4c2dc505e5d5267b02b1df96e90a7d.tar.gz ferdium-app-59d665af9d4c2dc505e5d5267b02b1df96e90a7d.tar.zst ferdium-app-59d665af9d4c2dc505e5d5267b02b1df96e90a7d.zip |
chore: remove @mdi/font in favor of using icons with @mdi/js directly (#2158)
Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Diffstat (limited to 'src/components/layout/Sidebar.js')
-rw-r--r-- | src/components/layout/Sidebar.js | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/components/layout/Sidebar.js b/src/components/layout/Sidebar.js index 18492be80..728613f42 100644 --- a/src/components/layout/Sidebar.js +++ b/src/components/layout/Sidebar.js | |||
@@ -4,6 +4,16 @@ import ReactTooltip from 'react-tooltip'; | |||
4 | import { defineMessages, injectIntl } from 'react-intl'; | 4 | import { defineMessages, injectIntl } from 'react-intl'; |
5 | import { inject, observer } from 'mobx-react'; | 5 | import { inject, observer } from 'mobx-react'; |
6 | import { Link } from 'react-router'; | 6 | import { Link } from 'react-router'; |
7 | import { | ||
8 | mdiCheckAll, | ||
9 | mdiViewGrid, | ||
10 | mdiPlusBox, | ||
11 | mdiLoginVariant, | ||
12 | mdiCog, | ||
13 | mdiBellOff, | ||
14 | mdiBell, | ||
15 | mdiLock, | ||
16 | } from '@mdi/js'; | ||
7 | 17 | ||
8 | import Tabbar from '../services/tabs/Tabbar'; | 18 | import Tabbar from '../services/tabs/Tabbar'; |
9 | import { | 19 | import { |
@@ -19,6 +29,7 @@ import { todoActions } from '../../features/todos/actions'; | |||
19 | import AppStore from '../../stores/AppStore'; | 29 | import AppStore from '../../stores/AppStore'; |
20 | import SettingsStore from '../../stores/SettingsStore'; | 30 | import SettingsStore from '../../stores/SettingsStore'; |
21 | import globalMessages from '../../i18n/globalMessages'; | 31 | import globalMessages from '../../i18n/globalMessages'; |
32 | import { Icon } from '../ui/icon'; | ||
22 | 33 | ||
23 | const messages = defineMessages({ | 34 | const messages = defineMessages({ |
24 | addNewService: { | 35 | addNewService: { |
@@ -156,7 +167,7 @@ class Sidebar extends Component { | |||
156 | messages.lockFerdi, | 167 | messages.lockFerdi, |
157 | )} (${lockFerdiShortcutKey(false)})`} | 168 | )} (${lockFerdiShortcutKey(false)})`} |
158 | > | 169 | > |
159 | <i className="mdi mdi-lock" /> | 170 | <Icon icon={mdiLock} size={1.5} /> |
160 | </button> | 171 | </button> |
161 | ) : null} | 172 | ) : null} |
162 | {todosStore.isFeatureEnabledByUser ? ( | 173 | {todosStore.isFeatureEnabledByUser ? ( |
@@ -174,7 +185,7 @@ class Sidebar extends Component { | |||
174 | todosToggleMessage, | 185 | todosToggleMessage, |
175 | )} (${todosToggleShortcutKey(false)})`} | 186 | )} (${todosToggleShortcutKey(false)})`} |
176 | > | 187 | > |
177 | <i className="mdi mdi-check-all" /> | 188 | <Icon icon={mdiCheckAll} size={1.5} /> |
178 | </button> | 189 | </button> |
179 | ) : null} | 190 | ) : null} |
180 | <button | 191 | <button |
@@ -190,7 +201,7 @@ class Sidebar extends Component { | |||
190 | workspaceToggleMessage, | 201 | workspaceToggleMessage, |
191 | )} (${workspaceToggleShortcutKey(false)})`} | 202 | )} (${workspaceToggleShortcutKey(false)})`} |
192 | > | 203 | > |
193 | <i className="mdi mdi-view-grid" /> | 204 | <Icon icon={mdiViewGrid} size={1.5} /> |
194 | </button> | 205 | </button> |
195 | <button | 206 | <button |
196 | type="button" | 207 | type="button" |
@@ -205,7 +216,7 @@ class Sidebar extends Component { | |||
205 | isAppMuted ? messages.unmute : messages.mute, | 216 | isAppMuted ? messages.unmute : messages.mute, |
206 | )} (${muteFerdiShortcutKey(false)})`} | 217 | )} (${muteFerdiShortcutKey(false)})`} |
207 | > | 218 | > |
208 | <i className={`mdi mdi-bell${isAppMuted ? '-off' : ''}`} /> | 219 | <Icon icon={isAppMuted ? mdiBellOff : mdiBell} size={1.5} /> |
209 | </button> | 220 | </button> |
210 | <button | 221 | <button |
211 | type="button" | 222 | type="button" |
@@ -215,7 +226,7 @@ class Sidebar extends Component { | |||
215 | messages.addNewService, | 226 | messages.addNewService, |
216 | )} (${addNewServiceShortcutKey(false)})`} | 227 | )} (${addNewServiceShortcutKey(false)})`} |
217 | > | 228 | > |
218 | <i className="mdi mdi-plus-box" /> | 229 | <Icon icon={mdiPlusBox} size={1.5} /> |
219 | </button> | 230 | </button> |
220 | </> | 231 | </> |
221 | ) : ( | 232 | ) : ( |
@@ -224,7 +235,7 @@ class Sidebar extends Component { | |||
224 | className="sidebar__button sidebar__button--new-service" | 235 | className="sidebar__button sidebar__button--new-service" |
225 | data-tip="Login" | 236 | data-tip="Login" |
226 | > | 237 | > |
227 | <i className="mdi mdi-login-variant" /> | 238 | <Icon icon={mdiLoginVariant} size={1.5} /> |
228 | </Link> | 239 | </Link> |
229 | )} | 240 | )} |
230 | <button | 241 | <button |
@@ -235,7 +246,7 @@ class Sidebar extends Component { | |||
235 | globalMessages.settings, | 246 | globalMessages.settings, |
236 | )} (${settingsShortcutKey(false)})`} | 247 | )} (${settingsShortcutKey(false)})`} |
237 | > | 248 | > |
238 | <i className="mdi mdi-cog" /> | 249 | <Icon icon={mdiCog} size={1.5} /> |
239 | {(this.props.stores.app.updateStatus === | 250 | {(this.props.stores.app.updateStatus === |
240 | this.props.stores.app.updateStatusTypes.AVAILABLE || | 251 | this.props.stores.app.updateStatusTypes.AVAILABLE || |
241 | this.props.stores.app.updateStatus === | 252 | this.props.stores.app.updateStatus === |