aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/layout/Sidebar.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/layout/Sidebar.tsx')
-rw-r--r--src/components/layout/Sidebar.tsx68
1 files changed, 45 insertions, 23 deletions
diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx
index a81229dca..c37447357 100644
--- a/src/components/layout/Sidebar.tsx
+++ b/src/components/layout/Sidebar.tsx
@@ -3,28 +3,28 @@ import ReactTooltip from 'react-tooltip';
3import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; 3import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl';
4import { inject, observer } from 'mobx-react'; 4import { inject, observer } from 'mobx-react';
5import { 5import {
6 mdiBell,
7 mdiBellOff,
6 mdiCheckAll, 8 mdiCheckAll,
7 mdiViewGrid, 9 mdiChevronDown,
8 mdiPlusBox, 10 mdiChevronRight,
9 mdiCog, 11 mdiCog,
10 mdiBellOff,
11 mdiBell,
12 mdiLock, 12 mdiLock,
13 mdiMenu, 13 mdiMenu,
14 mdiChevronDown, 14 mdiPlusBox,
15 mdiChevronRight, 15 mdiViewGrid,
16 mdiViewSplitVertical, 16 mdiViewSplitVertical,
17} from '@mdi/js'; 17} from '@mdi/js';
18 18
19import Tabbar from '../services/tabs/Tabbar'; 19import Tabbar from '../services/tabs/Tabbar';
20import { 20import {
21 settingsShortcutKey, 21 addNewServiceShortcutKey,
22 lockFerdiumShortcutKey, 22 lockFerdiumShortcutKey,
23 muteFerdiumShortcutKey,
24 settingsShortcutKey,
25 splitModeToggleShortcutKey,
23 todosToggleShortcutKey, 26 todosToggleShortcutKey,
24 workspaceToggleShortcutKey, 27 workspaceToggleShortcutKey,
25 addNewServiceShortcutKey,
26 splitModeToggleShortcutKey,
27 muteFerdiumShortcutKey,
28} from '../../environment'; 28} from '../../environment';
29import { todosStore } from '../../features/todos'; 29import { todosStore } from '../../features/todos';
30import { todoActions } from '../../features/todos/actions'; 30import { todoActions } from '../../features/todos/actions';
@@ -86,21 +86,25 @@ interface IProps extends WrappedComponentProps {
86 actions?: Actions; 86 actions?: Actions;
87 stores?: RealStores; 87 stores?: RealStores;
88 88
89 deleteService: () => void;
90 updateService: () => void;
91 hibernateService: () => void;
92 wakeUpService: () => void;
93 toggleMuteApp: () => void; 89 toggleMuteApp: () => void;
94 toggleCollapseMenu: () => void; 90 toggleCollapseMenu: () => void;
95 toggleWorkspaceDrawer: () => void; 91 toggleWorkspaceDrawer: () => void;
96 openSettings: (arg: { path: string }) => void; 92 openSettings: (args: { path: string }) => void;
97 closeSettings: () => void; 93 closeSettings: () => void;
98 setActive: () => void; 94 setActive: (args: { serviceId: string }) => void;
99 reorder: () => void; 95 reorder: (args: { oldIndex: number; newIndex: number }) => void;
100 reload: () => void; 96 reload: (args: { serviceId: string }) => void;
101 toggleNotifications: () => void; 97 toggleNotifications: (args: { serviceId: string }) => void;
102 toggleAudio: () => void; 98 toggleAudio: (args: { serviceId: string }) => void;
103 toggleDarkMode: () => void; 99 toggleDarkMode: (args: { serviceId: string }) => void;
100 deleteService: (args: { serviceId: string }) => void;
101 hibernateService: (args: { serviceId: string }) => void;
102 wakeUpService: (args: { serviceId: string }) => void;
103 updateService: (args: {
104 serviceId: string;
105 serviceData: { isEnabled: boolean; isMediaPlaying: boolean };
106 redirect: boolean;
107 }) => void;
104} 108}
105 109
106interface IState { 110interface IState {
@@ -180,10 +184,28 @@ class Sidebar extends Component<IProps, IState> {
180 return ( 184 return (
181 <div className="sidebar"> 185 <div className="sidebar">
182 <Tabbar 186 <Tabbar
183 {...this.props} 187 useHorizontalStyle={stores!.settings.all.app.useHorizontalStyle}
188 showMessageBadgeWhenMutedSetting={
189 this.props.showMessageBadgeWhenMutedSetting
190 }
191 showServiceNameSetting={this.props.showServiceNameSetting}
192 showMessageBadgesEvenWhenMuted={
193 this.props.showMessageBadgesEvenWhenMuted
194 }
195 services={this.props.services}
196 setActive={this.props.setActive}
197 openSettings={this.props.openSettings}
184 enableToolTip={() => this.enableToolTip()} 198 enableToolTip={() => this.enableToolTip()}
185 disableToolTip={() => this.disableToolTip()} 199 disableToolTip={() => this.disableToolTip()}
186 useHorizontalStyle={stores!.settings.all.app.useHorizontalStyle} 200 reorder={this.props.reorder}
201 reload={this.props.reload}
202 toggleNotifications={this.props.toggleNotifications}
203 toggleAudio={this.props.toggleAudio}
204 toggleDarkMode={this.props.toggleDarkMode}
205 deleteService={this.props.deleteService}
206 updateService={this.props.updateService}
207 hibernateService={this.props.hibernateService}
208 wakeUpService={this.props.wakeUpService}
187 /> 209 />
188 <> 210 <>
189 {numberActiveButtons <= 1 || hideCollapseButton ? null : ( 211 {numberActiveButtons <= 1 || hideCollapseButton ? null : (