moment/src/qml/Base/HUserAvatar.qml

30 lines
716 B
QML
Raw Normal View History

2019-07-08 13:52:41 +10:00
// Copyright 2019 miruka
// This file is part of harmonyqml, licensed under LGPLv3.
import QtQuick 2.12
HAvatar {
property string userId: ""
2019-07-08 12:41:32 +10:00
readonly property var userInfo: userId ? users.find(userId) : ({})
name:
userInfo.displayName || userId.substring(1) // no leading @
imageUrl:
userInfo.avatarUrl ?
2019-07-10 12:48:59 +10:00
("image://python/crop/" + userInfo.avatarUrl) : null
toolTipImageUrl:
userInfo.avatarUrl ?
("image://python/scale/" + userInfo.avatarUrl) : null
//HImage {
//id: status
//anchors.right: parent.right
//anchors.bottom: parent.bottom
//source: "../../icons/status.svg"
//sourceSize.width: 12
//}
}