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>
This commit is contained in:
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()}