2019-12-19 22:46:16 +11:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
2019-09-09 23:12:51 +10:00
|
|
|
import QtQuick 2.12
|
2020-07-12 12:52:14 +10:00
|
|
|
import "../Base"
|
|
|
|
import "../Base/Buttons"
|
2019-09-09 23:12:51 +10:00
|
|
|
|
2020-06-25 22:32:08 +10:00
|
|
|
HFlickableColumnPopup {
|
|
|
|
id: popup
|
2019-09-09 23:12:51 +10:00
|
|
|
|
|
|
|
property string userId: ""
|
|
|
|
property string roomId: ""
|
|
|
|
property string roomName: ""
|
2019-09-10 10:24:29 +10:00
|
|
|
property var leftCallback: null
|
2020-06-25 22:32:08 +10:00
|
|
|
|
|
|
|
|
2020-07-12 12:52:14 +10:00
|
|
|
page.footer: AutoDirectionLayout {
|
2020-06-25 22:32:08 +10:00
|
|
|
ApplyButton {
|
|
|
|
id: leaveButton
|
|
|
|
icon.name: "room-leave"
|
|
|
|
text: qsTr("Leave")
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
py.callClientCoro(userId, "room_leave", [roomId], leftCallback)
|
|
|
|
popup.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CancelButton {
|
|
|
|
onClicked: popup.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
onOpened: leaveButton.forceActiveFocus()
|
|
|
|
|
|
|
|
SummaryLabel {
|
|
|
|
text: qsTr("Leave <i>%1</i>?").arg(roomName)
|
|
|
|
textFormat: Text.StyledText
|
|
|
|
}
|
|
|
|
|
|
|
|
DetailsLabel {
|
|
|
|
text: qsTr(
|
|
|
|
"If this room is private, you will not be able to rejoin it."
|
|
|
|
)
|
|
|
|
}
|
2019-09-09 23:12:51 +10:00
|
|
|
}
|