Add "Leave room" button to sidebar

BUG: 484425
This commit is contained in:
Tobias Fella
2024-03-28 23:36:29 +01:00
parent 6ab61fd41f
commit 2608d879fa
3 changed files with 47 additions and 0 deletions

View File

@@ -115,6 +115,20 @@ QQC2.ScrollView {
Layout.fillWidth: true
}
Delegates.RoundedItemDelegate {
id: leaveButton
icon.name: "arrow-left"
text: i18nc("@action:button", "Leave this room")
Layout.fillWidth: true
onClicked: {
Qt.createComponent('org.kde.neochat', 'ConfirmLeaveDialog.qml').createObject(root.QQC2.ApplicationWindow.window, {
room: root.room
}).open();
}
}
Kirigami.ListSectionHeader {
label: i18n("Members")
activeFocusOnTab: false