mirror of https://github.com/vector-im/riot-web
The tooltip now appears even when not collapsed when hover over the avater, to allow the full name to be shown
parent
ca75d93434
commit
6984a55b11
|
@ -114,6 +114,7 @@ module.exports = React.createClass({
|
|||
badge = <div className={ badgeClasses } onMouseEnter={this.badgeOnMouseEnter} onMouseLeave={this.badgeOnMouseLeave}>{ badgeContent }</div>;
|
||||
|
||||
var label;
|
||||
var tooltip;
|
||||
if (!this.props.collapsed) {
|
||||
var className = 'mx_RoomTile_name' + (this.props.isInvite ? ' mx_RoomTile_invite' : '');
|
||||
let nameHTML = emojifyText(name);
|
||||
|
@ -123,6 +124,11 @@ module.exports = React.createClass({
|
|||
} else {
|
||||
label = <div onMouseEnter={this.badgeOnMouseEnter} onMouseLeave={this.badgeOnMouseLeave} className={ className } dangerouslySetInnerHTML={nameHTML}></div>;
|
||||
}
|
||||
|
||||
if (this.state.hover) {
|
||||
var RoomTooltip = sdk.getComponent("rooms.RoomTooltip");
|
||||
tooltip = <RoomTooltip room={this.props.room}/>;
|
||||
}
|
||||
}
|
||||
else if (this.state.hover) {
|
||||
var RoomTooltip = sdk.getComponent("rooms.RoomTooltip");
|
||||
|
@ -151,6 +157,7 @@ module.exports = React.createClass({
|
|||
{ label }
|
||||
{ badge }
|
||||
{ incomingCallBox }
|
||||
{ tooltip }
|
||||
</div>
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue