mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 18:55:58 +03:00
Merge pull request #1441 from turt2live/travis/who_banned
Show who banned the user on hover
This commit is contained in:
commit
8958be9321
3 changed files with 11 additions and 3 deletions
|
@ -63,6 +63,7 @@ const BannedUser = React.createClass({
|
|||
propTypes: {
|
||||
canUnban: React.PropTypes.bool,
|
||||
member: React.PropTypes.object.isRequired, // js-sdk RoomMember
|
||||
by: React.PropTypes.string.isRequired,
|
||||
reason: React.PropTypes.string,
|
||||
},
|
||||
|
||||
|
@ -101,8 +102,10 @@ const BannedUser = React.createClass({
|
|||
return (
|
||||
<li>
|
||||
{ unbanButton }
|
||||
<strong>{this.props.member.name}</strong> {this.props.member.userId}
|
||||
{this.props.reason ? " " +_t('Reason') + ": " + this.props.reason : ""}
|
||||
<span title={_t("Banned by %(displayName)s", {displayName: this.props.by})}>
|
||||
<strong>{this.props.member.name}</strong> {this.props.member.userId}
|
||||
{this.props.reason ? " " +_t('Reason') + ": " + this.props.reason : ""}
|
||||
</span>
|
||||
</li>
|
||||
);
|
||||
},
|
||||
|
@ -709,8 +712,11 @@ module.exports = React.createClass({
|
|||
<ul className="mx_RoomSettings_banned">
|
||||
{banned.map(function(member) {
|
||||
const banEvent = member.events.member.getContent();
|
||||
const sender = self.props.room.getMember(member.events.member.getSender());
|
||||
let bannedBy = member.events.member.getSender(); // start by falling back to mxid
|
||||
if (sender) bannedBy = sender.name;
|
||||
return (
|
||||
<BannedUser key={member.userId} canUnban={canBanUsers} member={member} reason={banEvent.reason} />
|
||||
<BannedUser key={member.userId} canUnban={canBanUsers} member={member} reason={banEvent.reason} by={bannedBy} />
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
|
|
|
@ -801,6 +801,7 @@
|
|||
"This will allow you to reset your password and receive notifications.": "This will allow you to reset your password and receive notifications.",
|
||||
"To return to your account in future you need to set a password": "To return to your account in future you need to set a password",
|
||||
"Skip": "Skip",
|
||||
"Banned by %(displayName)s": "Banned by %(displayName)s",
|
||||
"Start verification": "Start verification",
|
||||
"Share without verifying": "Share without verifying",
|
||||
"Ignore request": "Ignore request",
|
||||
|
|
|
@ -600,6 +600,7 @@
|
|||
"Desktop specific": "Desktop specific",
|
||||
"Analytics": "Analytics",
|
||||
"Opt out of analytics": "Opt out of analytics",
|
||||
"Banned by %(displayName)s": "Banned by %(displayName)s",
|
||||
"Options": "Options",
|
||||
"Riot collects anonymous analytics to allow us to improve the application.": "Riot collects anonymous analytics to allow us to improve the application.",
|
||||
"Passphrases must match": "Passphrases must match",
|
||||
|
|
Loading…
Reference in a new issue