aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/services/tabs/TabBarSortableList.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2017-11-10 12:08:35 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2017-11-10 12:08:35 +0100
commitf5a9aa21e2ab958f60c143668f4836bc47e2b539 (patch)
tree7d7cb70dee56e6ca4a927f7789601cc428381659 /src/components/services/tabs/TabBarSortableList.js
parentfeat(Service): Add option to mute service (diff)
downloadferdium-app-f5a9aa21e2ab958f60c143668f4836bc47e2b539.tar.gz
ferdium-app-f5a9aa21e2ab958f60c143668f4836bc47e2b539.tar.zst
ferdium-app-f5a9aa21e2ab958f60c143668f4836bc47e2b539.zip
feat(App): Add option to mute all services in sidebar
Closes #8 #162
Diffstat (limited to 'src/components/services/tabs/TabBarSortableList.js')
-rw-r--r--src/components/services/tabs/TabBarSortableList.js22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/components/services/tabs/TabBarSortableList.js b/src/components/services/tabs/TabBarSortableList.js
index e5ae36419..0146f5b35 100644
--- a/src/components/services/tabs/TabBarSortableList.js
+++ b/src/components/services/tabs/TabBarSortableList.js
@@ -2,17 +2,8 @@ import React, { Component } from 'react';
2import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; 2import { observer, PropTypes as MobxPropTypes } from 'mobx-react';
3import PropTypes from 'prop-types'; 3import PropTypes from 'prop-types';
4import { SortableContainer } from 'react-sortable-hoc'; 4import { SortableContainer } from 'react-sortable-hoc';
5import { defineMessages, intlShape } from 'react-intl';
6 5
7import TabItem from './TabItem'; 6import TabItem from './TabItem';
8import { ctrlKey } from '../../../environment';
9
10const messages = defineMessages({
11 addNewService: {
12 id: 'sidebar.addNewService',
13 defaultMessage: '!!!Add new service',
14 },
15});
16 7
17@observer 8@observer
18class TabBarSortableList extends Component { 9class TabBarSortableList extends Component {
@@ -22,27 +13,23 @@ class TabBarSortableList extends Component {
22 openSettings: PropTypes.func.isRequired, 13 openSettings: PropTypes.func.isRequired,
23 reload: PropTypes.func.isRequired, 14 reload: PropTypes.func.isRequired,
24 toggleNotifications: PropTypes.func.isRequired, 15 toggleNotifications: PropTypes.func.isRequired,
16 toggleAudio: PropTypes.func.isRequired,
25 deleteService: PropTypes.func.isRequired, 17 deleteService: PropTypes.func.isRequired,
26 disableService: PropTypes.func.isRequired, 18 disableService: PropTypes.func.isRequired,
27 } 19 }
28 20
29 static contextTypes = {
30 intl: intlShape,
31 };
32
33 render() { 21 render() {
34 const { 22 const {
35 services, 23 services,
36 setActive, 24 setActive,
37 reload, 25 reload,
38 toggleNotifications, 26 toggleNotifications,
27 toggleAudio,
39 deleteService, 28 deleteService,
40 disableService, 29 disableService,
41 openSettings, 30 openSettings,
42 } = this.props; 31 } = this.props;
43 32
44 const { intl } = this.context;
45
46 return ( 33 return (
47 <ul 34 <ul
48 className="tabs" 35 className="tabs"
@@ -56,12 +43,13 @@ class TabBarSortableList extends Component {
56 shortcutIndex={index + 1} 43 shortcutIndex={index + 1}
57 reload={() => reload({ serviceId: service.id })} 44 reload={() => reload({ serviceId: service.id })}
58 toggleNotifications={() => toggleNotifications({ serviceId: service.id })} 45 toggleNotifications={() => toggleNotifications({ serviceId: service.id })}
46 toggleAudio={() => toggleAudio({ serviceId: service.id })}
59 deleteService={() => deleteService({ serviceId: service.id })} 47 deleteService={() => deleteService({ serviceId: service.id })}
60 disableService={() => disableService({ serviceId: service.id })} 48 disableService={() => disableService({ serviceId: service.id })}
61 openSettings={openSettings} 49 openSettings={openSettings}
62 /> 50 />
63 ))} 51 ))}
64 <li> 52 {/* <li>
65 <button 53 <button
66 className="sidebar__add-service" 54 className="sidebar__add-service"
67 onClick={() => openSettings({ path: 'recipes' })} 55 onClick={() => openSettings({ path: 'recipes' })}
@@ -69,7 +57,7 @@ class TabBarSortableList extends Component {
69 > 57 >
70 <span className="mdi mdi-plus" /> 58 <span className="mdi mdi-plus" />
71 </button> 59 </button>
72 </li> 60 </li> */}
73 </ul> 61 </ul>
74 ); 62 );
75 } 63 }