QML the invite dialog

This also adds a property `roomId` to TimelineModel.
This commit is contained in:
Loren Burkholder 2021-06-10 20:11:49 -04:00
parent 77a0c574bf
commit 6c57fa6c5b
14 changed files with 215 additions and 293 deletions

View file

@ -21,6 +21,12 @@ Rectangle {
z: 3
color: Nheko.colors.window
Component {
id: inviteDialog
InviteDialog {}
}
TapHandler {
onSingleTapped: {
if (room)
@ -111,7 +117,13 @@ Rectangle {
Platform.MenuItem {
visible: room ? room.permissions.canInvite() : false
text: qsTr("Invite users")
onTriggered: TimelineManager.openInviteUsersDialog()
onTriggered: {
var dialog = inviteDialog.createObject(topBar, {
"roomId": room.roomId,
"roomName": room.roomName
});
dialog.show();
}
}
Platform.MenuItem {