feat(Community Permissions): Update ENS icon in permission pills

Closes #10341
This commit is contained in:
Noelia 2023-04-25 13:31:14 +02:00 committed by Noelia
parent 87fa7cfe5a
commit 8ca70ea018
4 changed files with 34 additions and 18 deletions

View File

@ -108,9 +108,9 @@ QtObject {
available: false available: false
}, },
{ {
type: HoldingTypes.Type.Collectible, type: HoldingTypes.Type.Ens,
key: "Kitty1", key: "Ens",
amount: 12, amount: 1,
available: true available: true
} }
] ]
@ -151,6 +151,35 @@ QtObject {
} }
function createHoldingsModel4() { function createHoldingsModel4() {
return [
{
type: HoldingTypes.Type.Asset,
key: "socks",
amount: 15,
available: true
},
{
type: HoldingTypes.Type.Asset,
key: "snt",
amount: 25000,
available: true
},
{
type: HoldingTypes.Type.Ens,
key: "ENS",
amount: 1,
available: false
},
{
type: HoldingTypes.Type.Asset,
key: "Amp",
amount: 2,
available: true
}
]
}
function createHoldingsModel5() {
return [ return [
{ {
type: HoldingTypes.Type.Asset, type: HoldingTypes.Type.Asset,

View File

@ -74,7 +74,7 @@ Control {
leftPadding: 2 leftPadding: 2
title: model.text title: model.text
asset.name: model.imageSource asset.name: model.imageSource
asset.isImage: !model.isIcon asset.isImage: true
asset.bgColor: "transparent" asset.bgColor: "transparent"
asset.height: 28 asset.height: 28
asset.width: asset.height asset.width: asset.height

View File

@ -56,7 +56,7 @@ SortFilterProxyModel {
function getIcon(type, key) { function getIcon(type, key) {
if (type === HoldingTypes.Type.Ens) if (type === HoldingTypes.Type.Ens)
return "username" return Style.png("tokens/ENS")
const model = type === HoldingTypes.Type.Asset const model = type === HoldingTypes.Type.Asset
? assetsModel : collectiblesModel ? assetsModel : collectiblesModel
@ -70,19 +70,6 @@ SortFilterProxyModel {
return getIcon(model.type, model.key) return getIcon(model.type, model.key)
} }
}, },
ExpressionRole {
name: "isIcon"
function isIconType(type) {
return type === HoldingTypes.Type.Ens
}
expression: {
_assetsChanges.revision
_collectiblesChanges.revision
return isIconType(model.type)
}
},
ExpressionRole { ExpressionRole {
name: "operator" name: "operator"

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB