Spectral/qml/form/SettingAccountForm.qml

47 lines
1.3 KiB
QML
Raw Normal View History

import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import "qrc:/qml/component"
Page {
2018-07-22 14:16:53 +00:00
padding: 64
2018-07-22 14:16:53 +00:00
ColumnLayout {
RowLayout {
Layout.preferredHeight: 60
2018-07-22 14:16:53 +00:00
ImageStatus {
Layout.preferredWidth: height
Layout.fillHeight: true
source: matriqueController.isLogin ? connection.localUser && connection.localUser.avatarUrl ? "image://mxc/" + connection.localUser.avatarUrl : "" : "qrc:/asset/img/avatar.png"
displayText: matriqueController.isLogin && connection.localUser.displayName ? connection.localUser.displayName : "N"
2018-07-22 14:16:53 +00:00
opaqueBackground: false
}
2018-07-22 14:16:53 +00:00
ColumnLayout {
Layout.fillWidth: true
Layout.fillHeight: true
Label {
font.pointSize: 18
text: matriqueController.isLogin ? connection.localUser.displayName : ""
2018-07-22 14:16:53 +00:00
}
Label {
font.pointSize: 12
text: matriqueController.isLogin ? connection.localUser.id : ""
2018-07-22 14:16:53 +00:00
}
}
}
2018-07-22 14:16:53 +00:00
Button {
text: "Logout"
highlighted: true
onClicked: matriqueController.logout()
}
}
}