moment/src/gui/Popups/LeaveRoomPopup.qml
miruka 13558fd61c Popups: make key words colored instead of italic
The room name in room forget/leave/invite popups, the exception type in
the unexpected exception popup
2021-03-03 17:14:56 -04:00

48 lines
1.1 KiB
QML

// Copyright Mirage authors & contributors <https://github.com/mirukana/mirage>
// SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12
import "../Base"
import "../Base/Buttons"
HFlickableColumnPopup {
id: popup
property string userId: ""
property string roomId: ""
property string roomName: ""
property var leftCallback: null
page.footer: AutoDirectionLayout {
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 %1?").arg(
utils.htmlColorize(roomName, theme.colors.accentText),
)
textFormat: Text.StyledText
}
DetailsLabel {
text: qsTr(
"If this room is private, you will not be able to rejoin it."
)
}
}