moment/src/gui/Popups/ClearMessagesPopup.qml
miruka da4a5ab5cd Rework HBox-based pages and account settings
- Refactor everything about HBox, and adapt all the pages and popups
  that used it

- Replace HTabContainer by HTabbedBox

- Make boxes swippable

- Make esc presses in boxes click the cancel button

- Make all boxes and popups scrollable when needed

- Replace generic apply button icons in popups

- Fix tab focus for error and invite popups

- Rework (still WIP) the account settings page:
  - Use the standard tabbed design of other pages
  - Ditch the horizontal profile layout, hacky and impossible to extend
  - Add real-time coloring for the display name field

- Implement a device list in account settings (Sessions, still WIP)
2020-06-25 08:49:27 -04:00

43 lines
903 B
QML

// SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12
import "../Base/ButtonLayout"
HFlickableColumnPopup {
id: popup
property string userId: ""
property string roomId: ""
page.footer: ButtonLayout {
ApplyButton {
id: clearButton
text: qsTr("Clear")
icon.name: "clear-messages"
onClicked: {
py.callClientCoro(userId, "clear_events", [roomId])
popup.close()
}
}
CancelButton {
onClicked: popup.close()
}
}
SummaryLabel {
text: qsTr("Clear this room's messages?")
}
DetailsLabel {
text: qsTr(
"The messages will only be removed on your side. " +
"They will be available again after you restart the application."
)
}
onOpened: clearButton.forceActiveFocus()
}