diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-07-22 15:07:33 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-07-22 15:07:33 +0200 |
commit | 0ac550ecbb77c8aa3e3427c466f1be2c436a42aa (patch) | |
tree | e34bb1b4350963d4807eab8a37a41ca1a379779c /resources/qml/RoomList.qml | |
parent | Add trailing newline to session export to make gomuks happy (diff) | |
download | nheko-0ac550ecbb77c8aa3e3427c466f1be2c436a42aa.tar.xz |
Show confirmation dialog when leaving a room via the context menu
Diffstat (limited to 'resources/qml/RoomList.qml')
-rw-r--r-- | resources/qml/RoomList.qml | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml index 9dac5830..2be5fe92 100644 --- a/resources/qml/RoomList.qml +++ b/resources/qml/RoomList.qml @@ -61,9 +61,19 @@ Page { } } + Platform.MessageDialog { + id: leaveRoomDialog + + title: qsTr("Leave Room") + text: qsTr("Are you sure you want to leave this room?") + modality: Qt.Modal + onAccepted: Rooms.leave(roomContextMenu.roomid) + buttons: Dialog.Ok | Dialog.Cancel + } + Platform.MenuItem { text: qsTr("Leave room") - onTriggered: Rooms.leave(roomContextMenu.roomid) + onTriggered: leaveRoomDialog.open() } Platform.MenuSeparator { |