diff options
Diffstat (limited to 'src/components/services/tabs/TabItem.js')
-rw-r--r-- | src/components/services/tabs/TabItem.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/components/services/tabs/TabItem.js b/src/components/services/tabs/TabItem.js index 638e17d95..a7136c43f 100644 --- a/src/components/services/tabs/TabItem.js +++ b/src/components/services/tabs/TabItem.js | |||
@@ -28,6 +28,14 @@ const messages = defineMessages({ | |||
28 | id: 'tabs.item.enableNotification', | 28 | id: 'tabs.item.enableNotification', |
29 | defaultMessage: '!!!Enable notifications', | 29 | defaultMessage: '!!!Enable notifications', |
30 | }, | 30 | }, |
31 | disableAudio: { | ||
32 | id: 'tabs.item.disableAudio', | ||
33 | defaultMessage: '!!!Disable audio', | ||
34 | }, | ||
35 | enableAudio: { | ||
36 | id: 'tabs.item.enableAudio', | ||
37 | defaultMessage: '!!!Enable audio', | ||
38 | }, | ||
31 | disableService: { | 39 | disableService: { |
32 | id: 'tabs.item.disableService', | 40 | id: 'tabs.item.disableService', |
33 | defaultMessage: '!!!Disable Service', | 41 | defaultMessage: '!!!Disable Service', |
@@ -50,6 +58,7 @@ class TabItem extends Component { | |||
50 | shortcutIndex: PropTypes.number.isRequired, | 58 | shortcutIndex: PropTypes.number.isRequired, |
51 | reload: PropTypes.func.isRequired, | 59 | reload: PropTypes.func.isRequired, |
52 | toggleNotifications: PropTypes.func.isRequired, | 60 | toggleNotifications: PropTypes.func.isRequired, |
61 | toggleAudio: PropTypes.func.isRequired, | ||
53 | openSettings: PropTypes.func.isRequired, | 62 | openSettings: PropTypes.func.isRequired, |
54 | deleteService: PropTypes.func.isRequired, | 63 | deleteService: PropTypes.func.isRequired, |
55 | disableService: PropTypes.func.isRequired, | 64 | disableService: PropTypes.func.isRequired, |
@@ -67,6 +76,7 @@ class TabItem extends Component { | |||
67 | shortcutIndex, | 76 | shortcutIndex, |
68 | reload, | 77 | reload, |
69 | toggleNotifications, | 78 | toggleNotifications, |
79 | toggleAudio, | ||
70 | deleteService, | 80 | deleteService, |
71 | disableService, | 81 | disableService, |
72 | enableService, | 82 | enableService, |
@@ -96,6 +106,11 @@ class TabItem extends Component { | |||
96 | : intl.formatMessage(messages.enableNotifications), | 106 | : intl.formatMessage(messages.enableNotifications), |
97 | click: () => toggleNotifications(), | 107 | click: () => toggleNotifications(), |
98 | }, { | 108 | }, { |
109 | label: service.isMuted | ||
110 | ? intl.formatMessage(messages.enableAudio) | ||
111 | : intl.formatMessage(messages.disableAudio), | ||
112 | click: () => toggleAudio(), | ||
113 | }, { | ||
99 | label: intl.formatMessage(service.isEnabled ? messages.disableService : messages.enableService), | 114 | label: intl.formatMessage(service.isEnabled ? messages.disableService : messages.enableService), |
100 | click: () => (service.isEnabled ? disableService() : enableService()), | 115 | click: () => (service.isEnabled ? disableService() : enableService()), |
101 | }, { | 116 | }, { |