diff options
author | DeepBlueV7.X <nicolas.werner@hotmail.de> | 2023-10-01 12:58:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-01 12:58:31 +0000 |
commit | c3fd4026ab8199fc825826e30e22778bc19b31c8 (patch) | |
tree | 4c1361b0e9e3218c32d432531f8328fac4c7ec9c /resources | |
parent | Merge pull request #1537 from Nheko-Reborn/issue1426 (diff) | |
parent | Add close button and room open button to room directory dialog (diff) | |
download | nheko-c3fd4026ab8199fc825826e30e22778bc19b31c8.tar.xz |
Merge pull request #1571 from Nheko-Reborn/directory
Add close button and room open button to room directory dialog
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/dialogs/RoomDirectory.qml | 26 |
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 + } + } + } |