;
nameClasses += ' mx_EntityTile_name_hover';
}
if (this.props.subtextLabel) {
presenceLabel = {this.props.subtextLabel};
}
nameEl = (
{name}
{presenceLabel}
);
} else if (this.props.subtextLabel) {
nameEl = (
{name}
{this.props.subtextLabel}
);
} else {
nameEl = (
{ name }
);
}
let inviteButton;
if (this.props.showInviteButton) {
inviteButton = (
);
}
let power;
const powerStatus = this.props.powerStatus;
if (powerStatus) {
const src = {
[EntityTile.POWER_STATUS_MODERATOR]: "img/mod.svg",
[EntityTile.POWER_STATUS_ADMIN]: "img/admin.svg",
}[powerStatus];
const alt = {
[EntityTile.POWER_STATUS_MODERATOR]: _t("Moderator"),
[EntityTile.POWER_STATUS_ADMIN]: _t("Admin"),
}[powerStatus];
power = ;
}
const BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
const av = this.props.avatarJsx || ;
return (
{ av }
{ power }
{ nameEl }
{ inviteButton }
);
},
});
EntityTile.POWER_STATUS_MODERATOR = "moderator";
EntityTile.POWER_STATUS_ADMIN = "admin";
export default EntityTile;