Fix: the Firend in the bar now shows better when selected

This commit is contained in:
duckietm 2024-03-27 15:59:20 +01:00
parent 04fedeea4f
commit 08f03feb7d
2 changed files with 5 additions and 1 deletions

View File

@ -141,6 +141,10 @@
pointer-events: none;
}
.avatar-image {
max-height: 80px;
}
&.friend-bar-search {
.friend-bar-item-head {

View File

@ -43,7 +43,7 @@ export const FriendBarItemView: FC<{ friend: MessengerFriend }> = props =>
return (
<div ref={ elementRef } className={ 'btn btn-friendsgensuccess friend-bar-item ' + (isVisible ? 'friend-bar-item-active' : '') } onClick={ event => setVisible(prevValue => !prevValue) }>
<div className={ `friend-bar-item-head position-absolute ${ friend.id > 0 ? 'avatar': 'group' }` }>
{ (friend.id > 0) && <LayoutAvatarImageView headOnly={ true } figure={ friend.figure } direction={ 2 } /> }
{ (friend.id > 0) && <LayoutAvatarImageView headOnly={ !isVisible } figure={ friend.figure } direction={ 2 } /> }
{ (friend.id <= 0) && <LayoutBadgeImageView isGroup={ true } badgeCode={ friend.figure } /> }
</div>
<div className="text-truncate">{ friend.name }</div>