You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-17 17:42:41 +03:00
Change power icon to label instead
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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 }
|
||||||
|
|||||||
Reference in New Issue
Block a user