2019-05-05 12:57:56 +00:00
|
|
|
import QtQuick 2.4
|
|
|
|
import QtQuick.Controls 2.1
|
|
|
|
import QtQuick.Controls.Material 2.1
|
|
|
|
import QtQuick.Layouts 1.3
|
|
|
|
|
|
|
|
ColumnLayout {
|
2019-05-06 18:16:20 +00:00
|
|
|
property var profile
|
|
|
|
|
2019-05-05 12:57:56 +00:00
|
|
|
RowLayout {
|
|
|
|
id: accountLayout
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
spacing: 16
|
|
|
|
Layout.topMargin: 16
|
|
|
|
Layout.leftMargin: 16
|
|
|
|
Layout.bottomMargin: 4
|
|
|
|
ImageButton {
|
2019-05-06 18:16:20 +00:00
|
|
|
height: 64
|
|
|
|
width: 64
|
2019-05-05 12:57:56 +00:00
|
|
|
opacity: 1.0
|
|
|
|
rounded: true
|
|
|
|
horizontalAlignment: Image.AlignHCenter
|
|
|
|
verticalAlignment: Image.AlignVCenter
|
2019-05-06 18:16:20 +00:00
|
|
|
source: profile.avatar
|
2019-05-05 12:57:56 +00:00
|
|
|
sourceSize.height: 64
|
|
|
|
onClicked: function() {
|
2019-05-06 18:16:20 +00:00
|
|
|
// Qt.openUrlExternally(profile.profileURL)
|
|
|
|
uiBridge.loadAccount(profile.profileID)
|
|
|
|
accountPopup.open()
|
2019-05-05 12:57:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
ColumnLayout {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Label {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignLeft
|
2019-05-06 18:16:20 +00:00
|
|
|
text: profile.name
|
2019-05-05 12:57:56 +00:00
|
|
|
font.pixelSize: 16
|
|
|
|
font.bold: true
|
|
|
|
elide: Label.ElideRight
|
|
|
|
}
|
|
|
|
Label {
|
2019-05-06 18:16:20 +00:00
|
|
|
text: profile.username
|
2019-05-05 12:57:56 +00:00
|
|
|
font.pixelSize: 16
|
|
|
|
opacity: 0.7
|
|
|
|
elide: Label.ElideRight
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
RowLayout {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
Label {
|
|
|
|
Layout.alignment: Qt.AlignLeft
|
2019-05-06 18:16:20 +00:00
|
|
|
text: "<b>" + profile.posts + "</b> Posts"
|
2019-05-05 12:57:56 +00:00
|
|
|
font.pixelSize: 11
|
|
|
|
elide: Label.ElideRight
|
|
|
|
}
|
|
|
|
Label {
|
|
|
|
Layout.alignment: Qt.AlignCenter
|
2019-05-06 18:16:20 +00:00
|
|
|
text: "<b>" + profile.follows + "</b> Follows"
|
2019-05-05 12:57:56 +00:00
|
|
|
font.pixelSize: 11
|
|
|
|
elide: Label.ElideRight
|
|
|
|
}
|
|
|
|
Label {
|
|
|
|
Layout.alignment: Qt.AlignRight
|
2019-05-06 18:16:20 +00:00
|
|
|
text: "<b>" + profile.followers + "</b> Followers"
|
2019-05-05 12:57:56 +00:00
|
|
|
font.pixelSize: 11
|
|
|
|
elide: Label.ElideRight
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|