diff options
author | 2017-12-14 16:49:50 +0100 | |
---|---|---|
committer | 2017-12-14 16:49:50 +0100 | |
commit | cea7a5cde78189d43fdd4d43d6a5cb12cd29e1c5 (patch) | |
tree | 81507268d5eef4e51da52dc7fa21152552327252 /src/components | |
parent | remove unecessary console logs (diff) | |
download | ferdium-app-cea7a5cde78189d43fdd4d43d6a5cb12cd29e1c5.tar.gz ferdium-app-cea7a5cde78189d43fdd4d43d6a5cb12cd29e1c5.tar.zst ferdium-app-cea7a5cde78189d43fdd4d43d6a5cb12cd29e1c5.zip |
feat(Service): Add option to completely disable message badges
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/settings/services/EditServiceForm.js | 52 |
1 files changed, 38 insertions, 14 deletions
diff --git a/src/components/settings/services/EditServiceForm.js b/src/components/settings/services/EditServiceForm.js index 36cefe87c..32f9d72f0 100644 --- a/src/components/settings/services/EditServiceForm.js +++ b/src/components/settings/services/EditServiceForm.js | |||
@@ -67,6 +67,18 @@ const messages = defineMessages({ | |||
67 | id: 'settings.service.form.isMutedInfo', | 67 | id: 'settings.service.form.isMutedInfo', |
68 | defaultMessage: '!!!When disabled, all notification sounds and audio playback are muted', | 68 | defaultMessage: '!!!When disabled, all notification sounds and audio playback are muted', |
69 | }, | 69 | }, |
70 | headlineNotifications: { | ||
71 | id: 'settings.service.form.headlineNotifications', | ||
72 | defaultMessage: '!!!Notifications', | ||
73 | }, | ||
74 | headlineBadges: { | ||
75 | id: 'settings.service.form.headlineBadges', | ||
76 | defaultMessage: '!!!Unread message dadges', | ||
77 | }, | ||
78 | headlineGeneral: { | ||
79 | id: 'settings.service.form.headlineGeneral', | ||
80 | defaultMessage: '!!!General', | ||
81 | }, | ||
70 | }); | 82 | }); |
71 | 83 | ||
72 | @observer | 84 | @observer |
@@ -231,20 +243,32 @@ export default class EditServiceForm extends Component { | |||
231 | </Tabs> | 243 | </Tabs> |
232 | )} | 244 | )} |
233 | <div className="settings__options"> | 245 | <div className="settings__options"> |
234 | <Toggle field={form.$('isNotificationEnabled')} /> | 246 | <div className="settings__settings-group"> |
235 | {recipe.hasIndirectMessages && ( | 247 | <h3>{intl.formatMessage(messages.headlineNotifications)}</h3> |
236 | <div> | 248 | <Toggle field={form.$('isNotificationEnabled')} /> |
237 | <Toggle field={form.$('isIndirectMessageBadgeEnabled')} /> | 249 | <Toggle field={form.$('isMuted')} /> |
238 | <p className="settings__help"> | 250 | <p className="settings__help"> |
239 | {intl.formatMessage(messages.indirectMessageInfo)} | 251 | {intl.formatMessage(messages.isMutedInfo)} |
240 | </p> | 252 | </p> |
241 | </div> | 253 | </div> |
242 | )} | 254 | |
243 | <Toggle field={form.$('isMuted')} /> | 255 | <div className="settings__settings-group"> |
244 | <p className="settings__help"> | 256 | <h3>{intl.formatMessage(messages.headlineBadges)}</h3> |
245 | {intl.formatMessage(messages.isMutedInfo)} | 257 | <Toggle field={form.$('isBadgeEnabled')} /> |
246 | </p> | 258 | {recipe.hasIndirectMessages && form.$('isBadgeEnabled').value && ( |
247 | <Toggle field={form.$('isEnabled')} /> | 259 | <div> |
260 | <Toggle field={form.$('isIndirectMessageBadgeEnabled')} /> | ||
261 | <p className="settings__help"> | ||
262 | {intl.formatMessage(messages.indirectMessageInfo)} | ||
263 | </p> | ||
264 | </div> | ||
265 | )} | ||
266 | </div> | ||
267 | |||
268 | <div className="settings__settings-group"> | ||
269 | <h3>{intl.formatMessage(messages.headlineGeneral)}</h3> | ||
270 | <Toggle field={form.$('isEnabled')} /> | ||
271 | </div> | ||
248 | </div> | 272 | </div> |
249 | {recipe.message && ( | 273 | {recipe.message && ( |
250 | <p className="settings__message"> | 274 | <p className="settings__message"> |