mirror of https://github.com/vector-im/riot-web
				
				
				
			Change power icon to label instead
							parent
							
								
									ceebb7dc55
								
							
						
					
					
						commit
						bae35c0859
					
				| 
						 | 
				
			
			@ -64,14 +64,6 @@ limitations under the License.
 | 
			
		|||
    position: relative;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.mx_EntityTile_power {
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    width: 16px;
 | 
			
		||||
    height: 17px;
 | 
			
		||||
    top: 0px;
 | 
			
		||||
    right: 6px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.mx_EntityTile_name,
 | 
			
		||||
.mx_GroupRoomTile_name {
 | 
			
		||||
    flex: 1 1 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -156,18 +156,13 @@ const EntityTile = createReactClass({
 | 
			
		|||
            );
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        let power;
 | 
			
		||||
        let powerLabel;
 | 
			
		||||
        const powerStatus = this.props.powerStatus;
 | 
			
		||||
        if (powerStatus) {
 | 
			
		||||
            const src = {
 | 
			
		||||
                [EntityTile.POWER_STATUS_MODERATOR]: require("../../../../res/img/mod.svg"),
 | 
			
		||||
                [EntityTile.POWER_STATUS_ADMIN]: require("../../../../res/img/admin.svg"),
 | 
			
		||||
            }[powerStatus];
 | 
			
		||||
            const alt = {
 | 
			
		||||
            powerLabel = {
 | 
			
		||||
                [EntityTile.POWER_STATUS_MODERATOR]: _t("Moderator"),
 | 
			
		||||
                [EntityTile.POWER_STATUS_ADMIN]: _t("Admin"),
 | 
			
		||||
            }[powerStatus];
 | 
			
		||||
            power = <img src={src} className="mx_EntityTile_power" width="16" height="17" alt={alt} />;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        const BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
 | 
			
		||||
| 
						 | 
				
			
			@ -181,7 +176,7 @@ const EntityTile = createReactClass({
 | 
			
		|||
                                  onClick={this.props.onClick}>
 | 
			
		||||
                    <div className="mx_EntityTile_avatar">
 | 
			
		||||
                        { av }
 | 
			
		||||
                        { power }
 | 
			
		||||
                        { powerLabel }
 | 
			
		||||
                    </div>
 | 
			
		||||
                    { nameEl }
 | 
			
		||||
                    { inviteButton }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue