2022-07-01 11:24:32 +00:00
|
|
|
|
import QtQuick 2.13
|
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
|
import QtQuick.Layouts 1.13
|
|
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
import StatusQ.Popups 0.1
|
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
id: balancedExceededError
|
|
|
|
|
|
|
|
|
|
property bool transferPossible: false
|
|
|
|
|
property double amountToSend: 0
|
2022-10-17 10:17:25 +00:00
|
|
|
|
property bool isLoading: true
|
2022-07-01 11:24:32 +00:00
|
|
|
|
|
2022-11-25 09:13:02 +00:00
|
|
|
|
visible: !balancedExceededError.transferPossible || isLoading
|
2022-07-27 21:10:00 +00:00
|
|
|
|
|
2022-07-01 11:24:32 +00:00
|
|
|
|
StatusIcon {
|
2022-07-27 21:10:00 +00:00
|
|
|
|
Layout.preferredHeight: 20
|
|
|
|
|
Layout.preferredWidth: 20
|
2022-07-01 11:24:32 +00:00
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
|
icon: "cancel"
|
|
|
|
|
color: Theme.palette.dangerColor1
|
2022-10-17 10:17:25 +00:00
|
|
|
|
visible: !isLoading
|
|
|
|
|
}
|
|
|
|
|
StatusLoadingIndicator {
|
|
|
|
|
Layout.preferredHeight: 24
|
|
|
|
|
Layout.preferredWidth: 24
|
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
|
visible: isLoading
|
2022-07-01 11:24:32 +00:00
|
|
|
|
}
|
|
|
|
|
StatusBaseText {
|
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
2022-07-27 21:10:00 +00:00
|
|
|
|
font.pixelSize: 13
|
2022-07-01 11:24:32 +00:00
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
|
color: Theme.palette.dangerColor1
|
2022-11-25 09:13:02 +00:00
|
|
|
|
text: isLoading ? qsTr("Calculating fees") : qsTr("Balance exceeded")
|
2022-07-01 11:24:32 +00:00
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
|
}
|
|
|
|
|
}
|