Change power icon to label instead

pull/21833/head
J. Ryan Stinnett 2020-01-30 16:00:09 +00:00
parent ceebb7dc55
commit bae35c0859
2 changed files with 3 additions and 16 deletions

View File

@ -64,14 +64,6 @@ limitations under the License.
position: relative; position: relative;
} }
.mx_EntityTile_power {
position: absolute;
width: 16px;
height: 17px;
top: 0px;
right: 6px;
}
.mx_EntityTile_name, .mx_EntityTile_name,
.mx_GroupRoomTile_name { .mx_GroupRoomTile_name {
flex: 1 1 0; flex: 1 1 0;

View File

@ -156,18 +156,13 @@ const EntityTile = createReactClass({
); );
} }
let power; let powerLabel;
const powerStatus = this.props.powerStatus; const powerStatus = this.props.powerStatus;
if (powerStatus) { if (powerStatus) {
const src = { powerLabel = {
[EntityTile.POWER_STATUS_MODERATOR]: require("../../../../res/img/mod.svg"),
[EntityTile.POWER_STATUS_ADMIN]: require("../../../../res/img/admin.svg"),
}[powerStatus];
const alt = {
[EntityTile.POWER_STATUS_MODERATOR]: _t("Moderator"), [EntityTile.POWER_STATUS_MODERATOR]: _t("Moderator"),
[EntityTile.POWER_STATUS_ADMIN]: _t("Admin"), [EntityTile.POWER_STATUS_ADMIN]: _t("Admin"),
}[powerStatus]; }[powerStatus];
power = <img src={src} className="mx_EntityTile_power" width="16" height="17" alt={alt} />;
} }
const BaseAvatar = sdk.getComponent('avatars.BaseAvatar'); const BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
@ -181,7 +176,7 @@ const EntityTile = createReactClass({
onClick={this.props.onClick}> onClick={this.props.onClick}>
<div className="mx_EntityTile_avatar"> <div className="mx_EntityTile_avatar">
{ av } { av }
{ power } { powerLabel }
</div> </div>
{ nameEl } { nameEl }
{ inviteButton } { inviteButton }