Merge pull request #4988 from vector-im/t3chguy/hide_notification_body

allow hiding of notification body for privacy reasons
This commit is contained in:
Matthew Hodgson 2017-10-14 23:07:31 +01:00 committed by GitHub
commit 2667ed2561
2 changed files with 21 additions and 0 deletions

View File

@ -116,6 +116,11 @@ module.exports = React.createClass({
UserSettingsStore.setEnableNotifications(event.target.checked); UserSettingsStore.setEnableNotifications(event.target.checked);
}, },
onEnableDesktopNotificationBodyChange: function(event) {
UserSettingsStore.setEnableNotificationBody(event.target.checked);
this.forceUpdate();
},
onEnableEmailNotificationsChange: function(address, event) { onEnableEmailNotificationsChange: function(address, event) {
var emailPusherPromise; var emailPusherPromise;
if (event.target.checked) { if (event.target.checked) {
@ -831,6 +836,21 @@ module.exports = React.createClass({
</div> </div>
</div> </div>
<div className="mx_UserNotifSettings_tableRow">
<div className="mx_UserNotifSettings_inputCell">
<input id="enableDesktopNotificationBody"
ref="enableDesktopNotificationBody"
type="checkbox"
checked={ UserSettingsStore.getEnableNotificationBody() }
onChange={ this.onEnableDesktopNotificationBodyChange } />
</div>
<div className="mx_UserNotifSettings_labelCell">
<label htmlFor="enableDesktopNotificationBody">
{ _t('Show message in desktop notification') }
</label>
</div>
</div>
<div className="mx_UserNotifSettings_tableRow"> <div className="mx_UserNotifSettings_tableRow">
<div className="mx_UserNotifSettings_inputCell"> <div className="mx_UserNotifSettings_inputCell">
<input id="enableDesktopAudioNotifications" <input id="enableDesktopAudioNotifications"

View File

@ -33,6 +33,7 @@
"Download this file": "Download this file", "Download this file": "Download this file",
"Enable audible notifications in web client": "Enable audible notifications in web client", "Enable audible notifications in web client": "Enable audible notifications in web client",
"Enable desktop notifications": "Enable desktop notifications", "Enable desktop notifications": "Enable desktop notifications",
"Show message in desktop notification": "Show message in desktop notification",
"Enable email notifications": "Enable email notifications", "Enable email notifications": "Enable email notifications",
"Enable notifications for this account": "Enable notifications for this account", "Enable notifications for this account": "Enable notifications for this account",
"Enable them now": "Enable them now", "Enable them now": "Enable them now",