diff options
author | 2017-11-11 19:30:03 +0100 | |
---|---|---|
committer | 2017-11-11 19:30:03 +0100 | |
commit | 0643ceed47d4ffa3aae1ec559af584b575024947 (patch) | |
tree | 6c114cdb1d5f7aec869e8b254ed1dfb2ba03b13f /src/containers/settings/EditServiceScreen.js | |
parent | Merge pull request #255 from meetfranz/feature/117-disable-gpu (diff) | |
parent | slightly reduce tab height (diff) | |
download | ferdium-app-0643ceed47d4ffa3aae1ec559af584b575024947.tar.gz ferdium-app-0643ceed47d4ffa3aae1ec559af584b575024947.tar.zst ferdium-app-0643ceed47d4ffa3aae1ec559af584b575024947.zip |
Merge pull request #252 from meetfranz/feature/mute-service
[WIP] Mute services
Diffstat (limited to 'src/containers/settings/EditServiceScreen.js')
-rw-r--r-- | src/containers/settings/EditServiceScreen.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/containers/settings/EditServiceScreen.js b/src/containers/settings/EditServiceScreen.js index 6c614b941..191ef447b 100644 --- a/src/containers/settings/EditServiceScreen.js +++ b/src/containers/settings/EditServiceScreen.js | |||
@@ -9,7 +9,6 @@ import ServicesStore from '../../stores/ServicesStore'; | |||
9 | import Form from '../../lib/Form'; | 9 | import Form from '../../lib/Form'; |
10 | import { gaPage } from '../../lib/analytics'; | 10 | import { gaPage } from '../../lib/analytics'; |
11 | 11 | ||
12 | |||
13 | import ServiceError from '../../components/settings/services/ServiceError'; | 12 | import ServiceError from '../../components/settings/services/ServiceError'; |
14 | import EditServiceForm from '../../components/settings/services/EditServiceForm'; | 13 | import EditServiceForm from '../../components/settings/services/EditServiceForm'; |
15 | import { required, url, oneRequired } from '../../helpers/validation-helpers'; | 14 | import { required, url, oneRequired } from '../../helpers/validation-helpers'; |
@@ -27,6 +26,10 @@ const messages = defineMessages({ | |||
27 | id: 'settings.service.form.enableNotification', | 26 | id: 'settings.service.form.enableNotification', |
28 | defaultMessage: '!!!Enable Notifications', | 27 | defaultMessage: '!!!Enable Notifications', |
29 | }, | 28 | }, |
29 | enableAudio: { | ||
30 | id: 'settings.service.form.enableAudio', | ||
31 | defaultMessage: '!!!Enable audio', | ||
32 | }, | ||
30 | team: { | 33 | team: { |
31 | id: 'settings.service.form.team', | 34 | id: 'settings.service.form.team', |
32 | defaultMessage: '!!!Team', | 35 | defaultMessage: '!!!Team', |
@@ -51,11 +54,14 @@ export default class EditServiceScreen extends Component { | |||
51 | gaPage('Settings/Service/Edit'); | 54 | gaPage('Settings/Service/Edit'); |
52 | } | 55 | } |
53 | 56 | ||
54 | onSubmit(serviceData) { | 57 | onSubmit(data) { |
55 | const { action } = this.props.router.params; | 58 | const { action } = this.props.router.params; |
56 | const { recipes, services } = this.props.stores; | 59 | const { recipes, services } = this.props.stores; |
57 | const { createService, updateService } = this.props.actions.service; | 60 | const { createService, updateService } = this.props.actions.service; |
58 | 61 | ||
62 | const serviceData = data; | ||
63 | serviceData.isMuted = !serviceData.isMuted; | ||
64 | |||
59 | if (action === 'edit') { | 65 | if (action === 'edit') { |
60 | updateService({ serviceId: services.activeSettings.id, serviceData }); | 66 | updateService({ serviceId: services.activeSettings.id, serviceData }); |
61 | } else { | 67 | } else { |
@@ -82,6 +88,11 @@ export default class EditServiceScreen extends Component { | |||
82 | value: service.isNotificationEnabled, | 88 | value: service.isNotificationEnabled, |
83 | default: true, | 89 | default: true, |
84 | }, | 90 | }, |
91 | isMuted: { | ||
92 | label: intl.formatMessage(messages.enableAudio), | ||
93 | value: !service.isMuted, | ||
94 | default: true, | ||
95 | }, | ||
85 | }, | 96 | }, |
86 | }; | 97 | }; |
87 | 98 | ||