Implement room creation functions

This commit is contained in:
miruka
2019-11-08 15:32:12 -04:00
parent bfbeb83ce5
commit ad34d2d171
2 changed files with 49 additions and 1 deletions

View File

@@ -15,12 +15,32 @@ HBox {
]
buttonCallbacks: ({
apply: button => {
button.loading = true
let args = [
nameField.text || null,
topicField.text || null,
publicCheckBox.checked,
encryptCheckBox.checked,
! blockOtherServersCheckBox.checked,
]
py.callClientCoro(userId, "room_create", args, roomId => {
button.loading = false
pageLoader.showRoom(userId, roomId)
})
},
})
readonly property string userId: addChatPage.userId
HRoomAvatar {
// TODO: click to change the avatar
id: avatar
clientUserId: addChatPage.userId
clientUserId: userId
displayName: nameField.text
Layout.alignment: Qt.AlignCenter