feat: add the different sections of the collectibles

This commit is contained in:
Jonathan Rainville 2020-08-19 13:07:07 -04:00 committed by Iuri Matias
parent 07081d412c
commit ed88cf2a7e
6 changed files with 41 additions and 12 deletions

View File

@ -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 ""
}
}
}
}

View File

@ -13,6 +13,8 @@ Item {
property var getLink: function () {}
id: root
width: parent.width
height: childrenRect.height
CollectiblesHeader {
id: collectiblesHeader

View File

@ -37,7 +37,7 @@ ModalPopup {
label: popup.buttonText
anchors.top: parent.top
onClicked: {
console.log('Go to', popup.buttonLink)
Qt.openUrlExternally(popup.buttonLink)
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 950 B

View File

@ -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
}
}