mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-24 20:18:53 +03:00
Merge pull request #1571 from Nheko-Reborn/directory
Add close button and room open button to room directory dialog
This commit is contained in:
commit
c3fd4026ab
1 changed files with 23 additions and 3 deletions
|
@ -112,9 +112,17 @@ ApplicationWindow {
|
||||||
Layout.row: 1
|
Layout.row: 1
|
||||||
Layout.column: 1
|
Layout.column: 1
|
||||||
id: joinRoomButton
|
id: joinRoomButton
|
||||||
enabled: model.canJoin
|
enabled: model.roomid !== ""
|
||||||
text: "Join"
|
text: model.canJoin ? qsTr("Join") : qsTr("Open")
|
||||||
onClicked: publicRooms.joinRoom(model.index)
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue