2020-09-01 03:49:05 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
2022-07-27 21:10:00 +00:00
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
2022-10-17 10:17:25 +00:00
|
|
|
import StatusQ.Components 0.1
|
2022-07-27 21:10:00 +00:00
|
|
|
|
2021-09-28 15:04:06 +00:00
|
|
|
import utils 1.0
|
2022-10-17 10:17:25 +00:00
|
|
|
|
2021-10-14 12:14:11 +00:00
|
|
|
import "../panels"
|
2020-09-01 03:49:05 +00:00
|
|
|
|
2020-10-22 12:06:35 +00:00
|
|
|
Column {
|
2020-09-01 03:49:05 +00:00
|
|
|
id: root
|
2022-07-27 21:10:00 +00:00
|
|
|
|
2022-10-17 10:17:25 +00:00
|
|
|
visible: !isValid || isLoading
|
2020-10-22 12:06:35 +00:00
|
|
|
spacing: 5
|
2022-02-09 09:43:23 +00:00
|
|
|
|
2020-10-22 12:06:35 +00:00
|
|
|
property alias errorMessage: txtValidationError.text
|
2022-10-17 10:17:25 +00:00
|
|
|
property bool isValid: true
|
|
|
|
property bool isLoading: false
|
2022-05-19 08:53:57 +00:00
|
|
|
|
2022-07-27 21:10:00 +00:00
|
|
|
StatusIcon {
|
2020-09-01 03:49:05 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2022-07-27 21:10:00 +00:00
|
|
|
height: 20
|
|
|
|
width: 20
|
|
|
|
icon: "cancel"
|
|
|
|
color: Theme.palette.dangerColor1
|
2022-10-17 10:17:25 +00:00
|
|
|
visible: !isValid && !isLoading
|
|
|
|
}
|
|
|
|
StatusLoadingIndicator {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
width: 24
|
|
|
|
height: 24
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
visible: isLoading && isValid
|
2020-10-22 12:06:35 +00:00
|
|
|
}
|
|
|
|
StyledText {
|
|
|
|
id: txtValidationError
|
2022-07-26 18:14:55 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2022-10-17 10:17:25 +00:00
|
|
|
text: isLoading? qsTr("Calculating fees"): qsTr("Balance exceeded")
|
2020-10-22 12:06:35 +00:00
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
font.pixelSize: 13
|
|
|
|
height: 18
|
|
|
|
color: Style.current.danger
|
2020-09-01 03:49:05 +00:00
|
|
|
}
|
|
|
|
}
|