fix(StatusAccountSelector): adapt AccountSelector to new model (#482)
This commit is contained in:
parent
5fa646d2eb
commit
876c6e99f8
|
@ -54,8 +54,8 @@ Item {
|
||||||
if (!selectedAccount) {
|
if (!selectedAccount) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (selectedAccount.iconColor) {
|
if (selectedAccount.color) {
|
||||||
selectedIconImg.color = Utils.getThemeAccountColor(selectedAccount.iconColor, Theme.palette.accountColors) || Theme.palette.accountColors[0]
|
selectedIconImg.color = Utils.getThemeAccountColor(selectedAccount.color, Theme.palette.accountColors) || Theme.palette.accountColors[0]
|
||||||
}
|
}
|
||||||
if (selectedAccount.name) {
|
if (selectedAccount.name) {
|
||||||
selectedTextField.text = selectedAccount.name
|
selectedTextField.text = selectedAccount.name
|
||||||
|
@ -63,8 +63,8 @@ Item {
|
||||||
if (selectedAccount.address) {
|
if (selectedAccount.address) {
|
||||||
textSelectedAddress.text = selectedAccount.address + " •"
|
textSelectedAddress.text = selectedAccount.address + " •"
|
||||||
}
|
}
|
||||||
if (selectedAccount.fiatBalance) {
|
if (selectedAccount.currencyBalance) {
|
||||||
textSelectedAddressFiatBalance.text = selectedAccount.fiatBalance + " " + currency.toUpperCase()
|
textSelectedAddressFiatBalance.text = selectedAccount.currencyBalance + " " + currency.toUpperCase()
|
||||||
}
|
}
|
||||||
if (selectedAccount.assets && showBalanceForAssetSymbol) {
|
if (selectedAccount.assets && showBalanceForAssetSymbol) {
|
||||||
assetFound = Utils.findAssetBySymbol(selectedAccount.assets, showBalanceForAssetSymbol)
|
assetFound = Utils.findAssetBySymbol(selectedAccount.assets, showBalanceForAssetSymbol)
|
||||||
|
@ -194,7 +194,7 @@ Item {
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if (!root.selectedAccount && isFirstItem) {
|
if (!root.selectedAccount && isFirstItem) {
|
||||||
root.selectedAccount = { address, name, iconColor, assets, fiatBalance }
|
root.selectedAccount = { address, name, color: model.color, assets, currencyBalance }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ Item {
|
||||||
width: 20
|
width: 20
|
||||||
height: 20
|
height: 20
|
||||||
icon: "filled-account"
|
icon: "filled-account"
|
||||||
color: Utils.getThemeAccountColor(iconColor, Theme.palette.accountColors) || Theme.palette.accountColors[0]
|
color: Utils.getThemeAccountColor(model.color, Theme.palette.accountColors) || Theme.palette.accountColors[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
@ -247,7 +247,7 @@ Item {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
height: 22
|
height: 22
|
||||||
text: fiatBalance
|
text: currencyBalance
|
||||||
color: Theme.palette.directColor1
|
color: Theme.palette.directColor1
|
||||||
}
|
}
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
|
@ -267,7 +267,7 @@ Item {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
anchors.fill: itemContainer
|
anchors.fill: itemContainer
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.selectedAccount = { address, name, iconColor, assets, fiatBalance }
|
root.selectedAccount = { address, name, color: model.color, assets, currencyBalance }
|
||||||
select.selectMenu.close()
|
select.selectMenu.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue