feat(keycard): remove balance from factory reset flow if user is not logged in

Closes: #9633
This commit is contained in:
Sale Djenic 2023-02-24 10:08:51 +01:00 committed by saledjenic
parent d6467923e4
commit 3441c2e182
1 changed files with 41 additions and 31 deletions

View File

@ -90,6 +90,41 @@ Rectangle {
anchors.rightMargin: Style.current.padding
ColumnLayout {
Component {
id: balance
StatusBaseText {
text: {
return LocaleUtils.currencyAmountToLocaleString({
amount: parseFloat(model.account.balance),
symbol: SharedStore.RootStore.currencyStore.currentCurrencySymbol,
displayDecimals: 2})
}
wrapMode: Text.WordWrap
font.pixelSize: Constants.keycard.general.fontSize2
color: Theme.palette.baseColor1
}
}
Component {
id: fetchingBalance
StatusLoadingIndicator {
width: 12
height: 12
}
}
Component {
id: path
StatusBaseText {
text: model.account.path
wrapMode: Text.WordWrap
font.pixelSize: Constants.keycard.general.fontSize2
color: Theme.palette.baseColor1
}
}
Row {
spacing: 0
padding: 0
@ -113,11 +148,9 @@ Rectangle {
}
}
StatusBaseText {
text: model.account.path
wrapMode: Text.WordWrap
font.pixelSize: Constants.keycard.general.fontSize2
color: Theme.palette.baseColor1
Loader {
active: Global.appIsReady
sourceComponent: path
}
}
@ -126,34 +159,11 @@ Rectangle {
Layout.preferredHeight: parent.height
}
Component {
id: balance
StatusBaseText {
text: {
return LocaleUtils.currencyAmountToLocaleString({
amount: parseFloat(model.account.balance),
symbol: SharedStore.RootStore.currencyStore.currentCurrencySymbol,
displayDecimals: 2})
}
wrapMode: Text.WordWrap
font.pixelSize: Constants.keycard.general.fontSize2
color: Theme.palette.baseColor1
}
}
Component {
id: fetchingBalance
StatusLoadingIndicator {
width: 12
height: 12
}
}
Loader {
id: fetchLoaderIndicator
Layout.alignment: Qt.AlignVCenter
sourceComponent: model.account.balanceFetched? balance : fetchingBalance
sourceComponent: Global.appIsReady?
(model.account.balanceFetched? balance : fetchingBalance)
: path
}
}
}