From ed88cf2a7ea7061b1711ea508e38a1dddfbc2606 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 19 Aug 2020 13:07:07 -0400 Subject: [PATCH] feat: add the different sections of the collectibles --- ui/app/AppLayouts/Wallet/CollectiblesTab.qml | 43 ++++++++++++++---- .../CollectiblesContainer.qml | 2 + .../CollectiblesModal.qml | 2 +- ui/app/img/collectibles/ethermons.png | Bin 0 -> 710 bytes ui/app/img/collectibles/kudos.png | Bin 0 -> 950 bytes ui/shared/TextWithLabel.qml | 6 +-- 6 files changed, 41 insertions(+), 12 deletions(-) create mode 100644 ui/app/img/collectibles/ethermons.png create mode 100644 ui/app/img/collectibles/kudos.png diff --git a/ui/app/AppLayouts/Wallet/CollectiblesTab.qml b/ui/app/AppLayouts/Wallet/CollectiblesTab.qml index 6860f6ba11..a0804f4491 100644 --- a/ui/app/AppLayouts/Wallet/CollectiblesTab.qml +++ b/ui/app/AppLayouts/Wallet/CollectiblesTab.qml @@ -36,14 +36,41 @@ Item { Component { id: collectiblesListComponent - CollectiblesContainer { - collectibleName: "CryptoKitties" - collectibleIconSource: "../../img/collectibles/CryptoKitties.png" - isLoading: root.isLoading - collectiblesModal: collectiblesModalComponent - buttonText: qsTr("View in Cryptokitties") - getLink: function (id) { - return `https://www.cryptokitties.co/kitty/${id}` + Column { + spacing: Style.current.halfPadding + anchors.fill: parent + + CollectiblesContainer { + collectibleName: "CryptoKitties" + collectibleIconSource: "../../img/collectibles/CryptoKitties.png" + isLoading: root.isLoading + collectiblesModal: collectiblesModalComponent + buttonText: qsTr("View in Cryptokitties") + getLink: function (id) { + return `https://www.cryptokitties.co/kitty/${id}` + } + } + + CollectiblesContainer { + collectibleName: "Ethermons" + collectibleIconSource: "../../img/collectibles/ethermons.png" + isLoading: root.isLoading + collectiblesModal: collectiblesModalComponent + buttonText: qsTr("View in Ethermon") + getLink: function (id) { + return `https://www.etheremon.com/#/mons/${id}` + } + } + + CollectiblesContainer { + collectibleName: "Kudos" + collectibleIconSource: "../../img/collectibles/kudos.png" + isLoading: root.isLoading + collectiblesModal: collectiblesModalComponent + buttonText: qsTr("View in Gitcoin") + getLink: function (id) { + return "" + } } } } diff --git a/ui/app/AppLayouts/Wallet/components/collectiblesComponents/CollectiblesContainer.qml b/ui/app/AppLayouts/Wallet/components/collectiblesComponents/CollectiblesContainer.qml index b9bb9f1155..4c8f5e62bc 100644 --- a/ui/app/AppLayouts/Wallet/components/collectiblesComponents/CollectiblesContainer.qml +++ b/ui/app/AppLayouts/Wallet/components/collectiblesComponents/CollectiblesContainer.qml @@ -13,6 +13,8 @@ Item { property var getLink: function () {} id: root + width: parent.width + height: childrenRect.height CollectiblesHeader { id: collectiblesHeader diff --git a/ui/app/AppLayouts/Wallet/components/collectiblesComponents/CollectiblesModal.qml b/ui/app/AppLayouts/Wallet/components/collectiblesComponents/CollectiblesModal.qml index e2ffd14a22..4ac0d9ce52 100644 --- a/ui/app/AppLayouts/Wallet/components/collectiblesComponents/CollectiblesModal.qml +++ b/ui/app/AppLayouts/Wallet/components/collectiblesComponents/CollectiblesModal.qml @@ -37,7 +37,7 @@ ModalPopup { label: popup.buttonText anchors.top: parent.top onClicked: { - console.log('Go to', popup.buttonLink) + Qt.openUrlExternally(popup.buttonLink) } } } diff --git a/ui/app/img/collectibles/ethermons.png b/ui/app/img/collectibles/ethermons.png new file mode 100644 index 0000000000000000000000000000000000000000..8fc72f1d4bcb79d5ccf08ed662b06fc81fdfb324 GIT binary patch literal 710 zcmV;%0y+JOP)p0007wNklonhL}(s^H>haw^%A|V{X#f`o9KdoH`hXCOE-KsF$ zArE%802e?6jxh=Vlv2wy#%I>IY^^z})dZ=ATvZZx4ZB*bTnp_!I-ia<#}SbtqHP*u z@0OKxH&fY6zEUb7vBV~nR7Ev>XGt+kiU{|oW_McKy)aJZ_fM&jPC@xy z_P6#)y&N1)MF(P`O&xljg?raeb0ecSpPP0(+cZ(w9&JmGwI*c=JJdj#xPvM2>DidT zd%0%u+n&#v|M=N_QA$LY&0<;(4yjtzhbwB#0{?bAl@^1qw~SlUMMaO)imAhFo?o{d zFDdIzF(wM7hI>OxJ>2~TNG5Yf2_bKcLN4Pgic^)FR`b9-6bzS0lrMO0)%WwBGi4OY zzV{%%xmL5}P$QLSM5DeOc5D!sL;!ptN+p4^A9nSa6uzv+KUw8@tISjCQ2$6QpsJo2 z@}pvd^~kJlI?zxORJz&}3vt}zw(jY!<1cglbCw=rY#^l6L|5kRjs)R{S|SGr)|p&S z3t#UKg(ph;U+RZlL3z<{Rs!U=o3;2vsN{Ge_ z8Yj$~l@F$#tZL5E*H?EgQba73ig!PL{~XVR73h_rPvIg0e+Z4Wx}_6rgYfqJ+Ou;5 z*=&Xa0HxH>^(QMEbHRwCg*llrv^fT0q=IhAI|t(@`m*h9fJhM$00?E&_g4PyEa~Q! s?N*T}JeLXzy>j3}M}`wc0N@z=4@mG%Kvijy&;S4c07*qoM6N<$g2uT!ZU6uP literal 0 HcmV?d00001 diff --git a/ui/app/img/collectibles/kudos.png b/ui/app/img/collectibles/kudos.png new file mode 100644 index 0000000000000000000000000000000000000000..b5d43e082481474f2f62ffea69cd06b3d7b33035 GIT binary patch literal 950 zcmV;n14;aeP)DnF+p?iUCWLsMMxv9#t15(4rz@X=2iq zV12a0F~z`FsQlhZ+2dB(8=K&^mr z0sDo*7wP-o{0)Sz9XQb$PZa$pV9-WjBY+u*hw~=K(`7w z0dORFL*z584zf!F4!7G_ZQTYdJWb#+7*fqkuyv`&y4qPfb4S|WTI&X1)w87VD1Qc+0b%O;E{#Lr9eX=^vZteYZYBVgi7*EIrD#|72pbR z1^9mhN>;_9{kOtpVMLbXEdUAtpJdeUj!pJdFPk>mQ*FaYFB~?561`BsmGw0Cq8GO} zw-}f{K=%o}>7kol|1P@*6(*qV$bijnO!win`cBED9^?MjW$oxqNvLdgQI z9P3_X44x;=Hb6BJzAQp-WV4xZJhb<6S+KyWlU+B49-9r!Yc$vZ={%qV^I`5CH13(Z zV!gUz2#ihiG+E&Vf|~#(BzzcJcOZkpS*+ikD)CQr#;f2xAZND`XooZ}=$LaDN;meO zUL0S(M1B9VUpb$6)WWt2+C*|r&W%dpq11&7)0keX_?CP<#Ws>{1mc1|55bXi`1{dv zUG;BkV&&;qR}qoThI|IXy#l9UG$J8Fv6a9*fKEB$1BE)CZs@=G&uZdAO$E_JHob<{ z+X7(+fEYjnAnBmDi!L0^RaE?lwZXEBaH)QJB^IBJ*1&q5g!1{&?aAk}GkAD!W~mW> Y0)*C$Vg5G!zyJUM07*qoM6N<$f@HzGbN~PV literal 0 HcmV?d00001 diff --git a/ui/shared/TextWithLabel.qml b/ui/shared/TextWithLabel.qml index 0f695eb664..0928d63b92 100644 --- a/ui/shared/TextWithLabel.qml +++ b/ui/shared/TextWithLabel.qml @@ -40,14 +40,14 @@ Item { Loader { active: !!infoText.textToCopy sourceComponent: copyComponent + anchors.verticalCenter: textItem.verticalCenter + anchors.left: textItem.right + anchors.leftMargin: Style.current.smallPadding } Component { id: copyComponent CopyToClipBoardButton { - anchors.verticalCenter: textItem.verticalCenter - anchors.left: textItem.right - anchors.leftMargin: Style.current.smallPadding textToCopy: infoText.textToCopy } }