mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-21 03:49:59 +00:00
d9d6d90dc9
- legacy Style and ThemePalette removed - moved and deduplicated font definitions into `Theme` (unrelated to a color palette) - `Style.current.foo` -> `Theme.foo` - `Style.current.fooColor` -> `Theme.palette.fooColor` - upgrade the imports to 5.15 - removed some mode dead components Fixes #16514
55 lines
1.4 KiB
QML
55 lines
1.4 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Controls 2.15
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import StatusQ.Core 0.1
|
|
import StatusQ.Core.Theme 0.1
|
|
import StatusQ.Components 0.1
|
|
|
|
import utils 1.0
|
|
|
|
import shared.panels 1.0
|
|
|
|
ColumnLayout {
|
|
id: root
|
|
|
|
property int errorType: Constants.NoError
|
|
property bool isLoading: false
|
|
|
|
QtObject {
|
|
id: d
|
|
readonly property bool isValid: root.errorType === Constants.NoError
|
|
}
|
|
|
|
visible: !d.isValid || isLoading
|
|
spacing: 5
|
|
|
|
StatusIcon {
|
|
Layout.alignment: Qt.AlignHCenter
|
|
Layout.preferredHeight: 20
|
|
Layout.preferredWidth: 20
|
|
icon: "cancel"
|
|
color: Theme.palette.dangerColor1
|
|
visible: !d.isValid && !isLoading
|
|
}
|
|
StyledText {
|
|
id: txtValidationError
|
|
Layout.alignment: Qt.AlignHCenter
|
|
Layout.preferredHeight: 18
|
|
text: errorType === Constants.SendAmountExceedsBalance ?
|
|
qsTr("Balance exceeded") : qsTr("No route found")
|
|
verticalAlignment: Text.AlignVCenter
|
|
horizontalAlignment: Text.AlignHCenter
|
|
font.pixelSize: 13
|
|
color: Theme.palette.dangerColor1
|
|
visible: !isLoading
|
|
}
|
|
Loader {
|
|
id: loadingComponent
|
|
Layout.preferredHeight: 32
|
|
Layout.preferredWidth: root.width - Theme.xlPadding
|
|
active: isLoading && d.isValid
|
|
sourceComponent: LoadingComponent { radius: 4 }
|
|
}
|
|
}
|