da4a5ab5cd
- 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)
65 lines
1.4 KiB
QML
65 lines
1.4 KiB
QML
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
import QtQuick 2.12
|
|
import QtQuick.Controls 2.12
|
|
import QtQuick.Layouts 1.12
|
|
import "../Base"
|
|
import "../Base/ButtonLayout"
|
|
|
|
HColumnPopup {
|
|
id: popup
|
|
|
|
|
|
property string errorType
|
|
property string message: ""
|
|
property string traceback: ""
|
|
|
|
|
|
page.footer: ButtonLayout {
|
|
ApplyButton {
|
|
text: qsTr("Report")
|
|
icon.name: "report-error"
|
|
enabled: false // TODO
|
|
}
|
|
|
|
CancelButton {
|
|
id: cancelButton
|
|
text: qsTr("Ignore")
|
|
onClicked: popup.close()
|
|
}
|
|
}
|
|
|
|
onOpened: cancelButton.forceActiveFocus()
|
|
|
|
|
|
SummaryLabel {
|
|
text: qsTr("Unexpected error occured: <i>%1</i>").arg(errorType)
|
|
textFormat: Text.StyledText
|
|
}
|
|
|
|
HScrollView {
|
|
clip: true
|
|
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
|
|
HTextArea {
|
|
text: [message, traceback].join("\n\n") || qsTr("No info available")
|
|
readOnly: true
|
|
font.family: theme.fontFamily.mono
|
|
focusOnTab: hideCheckBox
|
|
}
|
|
}
|
|
|
|
HCheckBox {
|
|
id: hideCheckBox
|
|
text: qsTr("Hide this type of error until restart")
|
|
onCheckedChanged:
|
|
checked ?
|
|
window.hideErrorTypes.add(errorType) :
|
|
window.hideErrorTypes.delete(errorType)
|
|
|
|
Layout.fillWidth: true
|
|
}
|
|
}
|