New backend work

Models, account connection, fetching user profiles,
show connected accounts in sidebar
This commit is contained in:
miruka
2019-06-28 18:12:45 -04:00
parent e5bdf6a497
commit a1b4d8900f
27 changed files with 458 additions and 42 deletions

View File

@@ -6,7 +6,9 @@ Column {
id: accountDelegate
width: parent.width
property var user: Backend.users.get(userId)
// Avoid binding loop by using Component.onCompleted
property var user: null
Component.onCompleted: user = models.users.getUser(userId)
property string roomCategoriesListUserId: userId
property bool expanded: true
@@ -18,7 +20,7 @@ Column {
HAvatar {
id: avatar
name: user.displayName.value
name: user.displayName
}
HColumnLayout {
@@ -27,7 +29,7 @@ Column {
HLabel {
id: accountLabel
text: user.displayName.value
text: user.displayName || user.userId
elide: HLabel.ElideRight
maximumLineCount: 1
Layout.fillWidth: true

View File

@@ -6,6 +6,6 @@ HListView {
id: accountList
clip: true
model: Backend.accounts
model: models.accounts
delegate: AccountDelegate {}
}