From 4df16e82456fc908b5f0ccd43438b62d6f8e390d Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 14 Sep 2017 12:51:53 -0600 Subject: [PATCH] Display which users are ignored in the user settings Adds https://github.com/vector-im/riot-web/issues/1767 Signed-off-by: Travis Ralston --- src/components/structures/UserSettings.js | 17 +++++++++++++++++ src/i18n/strings/en_EN.json | 1 + src/i18n/strings/en_US.json | 1 + 3 files changed, 19 insertions(+) diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index e67991ac12..6c87c6fe0a 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -796,6 +796,22 @@ module.exports = React.createClass({ ); }, + _renderIgnoredUsers: function() { + let ignoredUsers = MatrixClientPeg.get().getIgnoredUsers(); + if (ignoredUsers.length > 0) { + return ( +
+

{ _t("Ignored Users") }

+
+
    + {ignoredUsers.map(u => (
  • {u}
  • ))} +
+
+
+ ); + } else return (
); + }, + _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()} diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index de0b8e9ebb..ae98535e51 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -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", diff --git a/src/i18n/strings/en_US.json b/src/i18n/strings/en_US.json index dd94a82727..5870fe67f3 100644 --- a/src/i18n/strings/en_US.json +++ b/src/i18n/strings/en_US.json @@ -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",