summary refs log tree commit diff
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2023-09-29 22:49:45 -0400
committerLoren Burkholder <computersemiexpert@outlook.com>2023-09-29 22:49:45 -0400
commitb6f71a8bc2c124de9ae9af113e80ba908a7ea65a (patch)
treecec9906d60932f932788a4040cc2b8a2ed594e41
parentUpdate mtxclient to work around empty event types (diff)
downloadnheko-b6f71a8bc2c124de9ae9af113e80ba908a7ea65a.tar.xz
Add close button and room open button to room directory dialog
-rw-r--r--resources/qml/dialogs/RoomDirectory.qml26
1 files changed, 23 insertions, 3 deletions
diff --git a/resources/qml/dialogs/RoomDirectory.qml b/resources/qml/dialogs/RoomDirectory.qml

index a6f53d2e..97943e93 100644 --- a/resources/qml/dialogs/RoomDirectory.qml +++ b/resources/qml/dialogs/RoomDirectory.qml
@@ -112,9 +112,17 @@ ApplicationWindow { Layout.row: 1 Layout.column: 1 id: joinRoomButton - enabled: model.canJoin - text: "Join" - onClicked: publicRooms.joinRoom(model.index) + enabled: model.roomid !== "" + text: model.canJoin ? qsTr("Join") : qsTr("Open") + onClicked: { + if (model.canJoin) + publicRooms.joinRoom(model.index); + else + { + Rooms.setCurrentRoom(model.roomid); + roomDirectoryWindow.close(); + } + } } } @@ -184,4 +192,16 @@ ApplicationWindow { } + footer: RowLayout { + spacing: Nheko.paddingMedium + width: parent.width + + Button { + text: qsTr("Close") + onClicked: roomDirectoryWindow.close() + Layout.alignment: Qt.AlignRight + Layout.margins: Nheko.paddingMedium + } + } + }