diff options
Diffstat (limited to 'src/components/services/tabs/TabBarSortableList.js')
-rw-r--r-- | src/components/services/tabs/TabBarSortableList.js | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/components/services/tabs/TabBarSortableList.js b/src/components/services/tabs/TabBarSortableList.js index 3340cbbbb..2daf55676 100644 --- a/src/components/services/tabs/TabBarSortableList.js +++ b/src/components/services/tabs/TabBarSortableList.js | |||
@@ -2,17 +2,8 @@ import React, { Component } from 'react'; | |||
2 | import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; | 2 | import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; |
3 | import PropTypes from 'prop-types'; | 3 | import PropTypes from 'prop-types'; |
4 | import { SortableContainer } from 'react-sortable-hoc'; | 4 | import { SortableContainer } from 'react-sortable-hoc'; |
5 | import { defineMessages, intlShape } from 'react-intl'; | ||
6 | 5 | ||
7 | import TabItem from './TabItem'; | 6 | import TabItem from './TabItem'; |
8 | import { ctrlKey } from '../../../environment'; | ||
9 | |||
10 | const messages = defineMessages({ | ||
11 | addNewService: { | ||
12 | id: 'sidebar.addNewService', | ||
13 | defaultMessage: '!!!Add new service', | ||
14 | }, | ||
15 | }); | ||
16 | 7 | ||
17 | @observer | 8 | @observer |
18 | class TabBarSortableList extends Component { | 9 | class TabBarSortableList extends Component { |
@@ -22,29 +13,25 @@ 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 | enableService: PropTypes.func.isRequired, | 19 | enableService: PropTypes.func.isRequired, |
28 | } | 20 | } |
29 | 21 | ||
30 | static contextTypes = { | ||
31 | intl: intlShape, | ||
32 | }; | ||
33 | |||
34 | render() { | 22 | render() { |
35 | const { | 23 | const { |
36 | services, | 24 | services, |
37 | setActive, | 25 | setActive, |
38 | reload, | 26 | reload, |
39 | toggleNotifications, | 27 | toggleNotifications, |
28 | toggleAudio, | ||
40 | deleteService, | 29 | deleteService, |
41 | disableService, | 30 | disableService, |
42 | enableService, | 31 | enableService, |
43 | openSettings, | 32 | openSettings, |
44 | } = this.props; | 33 | } = this.props; |
45 | 34 | ||
46 | const { intl } = this.context; | ||
47 | |||
48 | return ( | 35 | return ( |
49 | <ul | 36 | <ul |
50 | className="tabs" | 37 | className="tabs" |
@@ -58,13 +45,14 @@ class TabBarSortableList extends Component { | |||
58 | shortcutIndex={index + 1} | 45 | shortcutIndex={index + 1} |
59 | reload={() => reload({ serviceId: service.id })} | 46 | reload={() => reload({ serviceId: service.id })} |
60 | toggleNotifications={() => toggleNotifications({ serviceId: service.id })} | 47 | toggleNotifications={() => toggleNotifications({ serviceId: service.id })} |
48 | toggleAudio={() => toggleAudio({ serviceId: service.id })} | ||
61 | deleteService={() => deleteService({ serviceId: service.id })} | 49 | deleteService={() => deleteService({ serviceId: service.id })} |
62 | disableService={() => disableService({ serviceId: service.id })} | 50 | disableService={() => disableService({ serviceId: service.id })} |
63 | enableService={() => enableService({ serviceId: service.id })} | 51 | enableService={() => enableService({ serviceId: service.id })} |
64 | openSettings={openSettings} | 52 | openSettings={openSettings} |
65 | /> | 53 | /> |
66 | ))} | 54 | ))} |
67 | <li> | 55 | {/* <li> |
68 | <button | 56 | <button |
69 | className="sidebar__add-service" | 57 | className="sidebar__add-service" |
70 | onClick={() => openSettings({ path: 'recipes' })} | 58 | onClick={() => openSettings({ path: 'recipes' })} |
@@ -72,7 +60,7 @@ class TabBarSortableList extends Component { | |||
72 | > | 60 | > |
73 | <span className="mdi mdi-plus" /> | 61 | <span className="mdi mdi-plus" /> |
74 | </button> | 62 | </button> |
75 | </li> | 63 | </li> */} |
76 | </ul> | 64 | </ul> |
77 | ); | 65 | ); |
78 | } | 66 | } |