From 8ca70ea018133ececfa4d2e9c630f1c9c916e278 Mon Sep 17 00:00:00 2001 From: Noelia Date: Tue, 25 Apr 2023 13:31:14 +0200 Subject: [PATCH] feat(Community Permissions): Update ENS icon in permission pills Closes #10341 --- storybook/src/Models/PermissionsModel.qml | 35 ++++++++++++++++-- .../panels/communities/HoldingsListPanel.qml | 2 +- .../communities/HoldingsSelectionModel.qml | 15 +------- ui/imports/assets/png/tokens/ENS.png | Bin 0 -> 7553 bytes 4 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 ui/imports/assets/png/tokens/ENS.png diff --git a/storybook/src/Models/PermissionsModel.qml b/storybook/src/Models/PermissionsModel.qml index bc0b884c42d..32cb705989f 100644 --- a/storybook/src/Models/PermissionsModel.qml +++ b/storybook/src/Models/PermissionsModel.qml @@ -108,9 +108,9 @@ QtObject { available: false }, { - type: HoldingTypes.Type.Collectible, - key: "Kitty1", - amount: 12, + type: HoldingTypes.Type.Ens, + key: "Ens", + amount: 1, available: true } ] @@ -151,6 +151,35 @@ QtObject { } 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 [ { type: HoldingTypes.Type.Asset, diff --git a/ui/app/AppLayouts/Chat/panels/communities/HoldingsListPanel.qml b/ui/app/AppLayouts/Chat/panels/communities/HoldingsListPanel.qml index 7aa83957a6d..50cf3e51acd 100644 --- a/ui/app/AppLayouts/Chat/panels/communities/HoldingsListPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/communities/HoldingsListPanel.qml @@ -74,7 +74,7 @@ Control { leftPadding: 2 title: model.text asset.name: model.imageSource - asset.isImage: !model.isIcon + asset.isImage: true asset.bgColor: "transparent" asset.height: 28 asset.width: asset.height diff --git a/ui/app/AppLayouts/Chat/views/communities/HoldingsSelectionModel.qml b/ui/app/AppLayouts/Chat/views/communities/HoldingsSelectionModel.qml index 95bb80c8b54..28d280487bb 100644 --- a/ui/app/AppLayouts/Chat/views/communities/HoldingsSelectionModel.qml +++ b/ui/app/AppLayouts/Chat/views/communities/HoldingsSelectionModel.qml @@ -56,7 +56,7 @@ SortFilterProxyModel { function getIcon(type, key) { if (type === HoldingTypes.Type.Ens) - return "username" + return Style.png("tokens/ENS") const model = type === HoldingTypes.Type.Asset ? assetsModel : collectiblesModel @@ -70,19 +70,6 @@ SortFilterProxyModel { 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 { name: "operator" diff --git a/ui/imports/assets/png/tokens/ENS.png b/ui/imports/assets/png/tokens/ENS.png new file mode 100644 index 0000000000000000000000000000000000000000..1552f4d3ac90aed8f272fa5e9ed8ac842e20c4e0 GIT binary patch literal 7553 zcmV-{9e(18P)Z0iLC6A9BuHG)PEZ0_N|OEY-us^3ALpEV?)SajeIW_- z!m@AQ_xtYm-p@Vfd_L#gy9>hqgEn*%4YZ*-h=2p`Yasv)koyW3u~-Sd9+-dH)E!#tq>$XhS#Cg6dFn4V5^E6%0aw^A#}nMgBXYdyD)F z^4Iu%(p&sH?m7mH`F#gA7C2lH+*Lw3JoFhHg;%+~YJhqW+vCl(1>#k1_Jei+)MFnt zkp0gXevTId@Px5Did_#^1#RhXH(oVxk2#=2H#G;{)YrI)U+tc@KtTaxjgW&{v&Qfm z)1?3&vPD*zsDk6&pWCc;I z5Ne_dvW#aTyp`2X}-P71R(B$fLg*%EqSaj}fp(9Z*j&M6Da#M6PBKk?`Lp3R0g~^N*8yOV*YVx}C@)l830;H;EW&0y2EZOwKsWqzdn2@~^@e1U z#R=Cy?#|N<%EC$3t@9fhJYevu_#L9n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