mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 20:38:55 +03:00
Use constants
This commit is contained in:
parent
e48d68a449
commit
0bb3eaaf67
1 changed files with 8 additions and 8 deletions
|
@ -77,40 +77,40 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
_onClickAlertMe: function() {
|
_onClickAlertMe: function() {
|
||||||
this._save('all_messages_loud');
|
this._save(RoomNotifs.ALL_MESSAGES_LOUD);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onClickAllNotifs: function() {
|
_onClickAllNotifs: function() {
|
||||||
this._save('all_messages');
|
this._save(RoomNotifs.ALL_MESSAGES);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onClickMentions: function() {
|
_onClickMentions: function() {
|
||||||
this._save('mentions_only');
|
this._save(RoomNotifs.MENTIONS_ONLY);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onClickMute: function() {
|
_onClickMute: function() {
|
||||||
this._save('mute');
|
this._save(RoomNotifs.MUTE);
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var alertMeClasses = classNames({
|
var alertMeClasses = classNames({
|
||||||
'mx_NotificationStateContextMenu_field': true,
|
'mx_NotificationStateContextMenu_field': true,
|
||||||
'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == 'all_messages_loud',
|
'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == RoomNotifs.ALL_MESSAGES_LOUD,
|
||||||
});
|
});
|
||||||
|
|
||||||
var allNotifsClasses = classNames({
|
var allNotifsClasses = classNames({
|
||||||
'mx_NotificationStateContextMenu_field': true,
|
'mx_NotificationStateContextMenu_field': true,
|
||||||
'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == 'all_messages',
|
'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == RoomNotifs.ALL_MESSAGES,
|
||||||
});
|
});
|
||||||
|
|
||||||
var mentionsClasses = classNames({
|
var mentionsClasses = classNames({
|
||||||
'mx_NotificationStateContextMenu_field': true,
|
'mx_NotificationStateContextMenu_field': true,
|
||||||
'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == 'mentions_only',
|
'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == RoomNotifs.MENTIONS_ONLY,
|
||||||
});
|
});
|
||||||
|
|
||||||
var muteNotifsClasses = classNames({
|
var muteNotifsClasses = classNames({
|
||||||
'mx_NotificationStateContextMenu_field': true,
|
'mx_NotificationStateContextMenu_field': true,
|
||||||
'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == 'mute',
|
'mx_NotificationStateContextMenu_fieldSet': this.state.roomNotifState == RoomNotifs.MUTE,
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue