Add HUserAvatar and HRoomAvatar components
This commit is contained in:
@@ -17,7 +17,7 @@ HRectangle {
|
||||
id: bannerRow
|
||||
anchors.fill: parent
|
||||
|
||||
HAvatar {
|
||||
HUserAvatar {
|
||||
id: bannerAvatar
|
||||
dimension: banner.Layout.preferredHeight
|
||||
}
|
||||
|
@@ -10,9 +10,7 @@ Banner {
|
||||
|
||||
color: theme.chat.inviteBanner.background
|
||||
|
||||
avatar.name: inviterId ? (inviterInfo.displayName ||
|
||||
Utils.stripUserId(inviterId)) : ""
|
||||
avatar.imageUrl: inviterId ? inviterInfo.avatarUrl : ""
|
||||
avatar.userId: inviterId
|
||||
|
||||
labelText: qsTr("%1 invited you to join the room.").arg(
|
||||
inviterId ?
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import QtQuick 2.7
|
||||
import "../../Base"
|
||||
import "../../utils.js" as Utils
|
||||
|
||||
Banner {
|
||||
property string userId: ""
|
||||
@@ -9,7 +8,7 @@ Banner {
|
||||
color: theme.chat.leftBanner.background
|
||||
|
||||
// TODO: avatar func auto
|
||||
avatar.name: userInfo.displayName || Utils.stripUserId(userId)
|
||||
avatar.userId: userId
|
||||
avatar.imageUrl: users.getUser(userId).avatarUrl
|
||||
labelText: qsTr("You are not part of this room anymore.")
|
||||
|
||||
|
Reference in New Issue
Block a user