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