Display which users are ignored in the user settings

Adds https://github.com/vector-im/riot-web/issues/1767

Signed-off-by: Travis Ralston <travpc@gmail.com>
pull/21833/head
Travis Ralston 2017-09-14 12:51:53 -06:00
parent 94ec11d3e1
commit 4df16e8245
3 changed files with 19 additions and 0 deletions

View File

@ -796,6 +796,22 @@ module.exports = React.createClass({
);
},
_renderIgnoredUsers: function() {
let ignoredUsers = MatrixClientPeg.get().getIgnoredUsers();
if (ignoredUsers.length > 0) {
return (
<div>
<h3>{ _t("Ignored Users") }</h3>
<div className="mx_UserSettings_section mx_UserSettings_ignoredUsersSection">
<ul>
{ignoredUsers.map(u => (<li key={u}>{u}</li>))}
</ul>
</div>
</div>
);
} else return (<div />);
},
_renderLocalSetting: function(setting) {
// TODO: this ought to be a separate component so that we don't need
// to rebind the onChange each time we render
@ -1302,6 +1318,7 @@ module.exports = React.createClass({
{this._renderWebRtcSettings()}
{this._renderDevicesPanel()}
{this._renderCryptoInfo()}
{this._renderIgnoredUsers()}
{this._renderBulkOptions()}
{this._renderBugReport()}

View File

@ -264,6 +264,7 @@
"Kick": "Kick",
"Kicks user with given id": "Kicks user with given id",
"Labs": "Labs",
"Ignored Users": "Ignored Users",
"Last seen": "Last seen",
"Leave room": "Leave room",
"left and rejoined": "left and rejoined",

View File

@ -231,6 +231,7 @@
"Kick": "Kick",
"Kicks user with given id": "Kicks user with given id",
"Labs": "Labs",
"Ignored Users": "Ignored Users",
"Leave room": "Leave room",
"left and rejoined": "left and rejoined",
"left": "left",