2020-08-19 15:58:25 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtGraphicalEffects 1.13
|
|
|
|
import "../../../../../imports"
|
|
|
|
import "../../../../../shared"
|
2021-01-28 11:04:10 +00:00
|
|
|
import "../../../../../shared/status"
|
2020-08-19 15:58:25 +00:00
|
|
|
|
|
|
|
ModalPopup {
|
|
|
|
property string collectibleName: "Furbeard"
|
|
|
|
property string collectibleId: "1423"
|
|
|
|
property url collectibleImage: "../../../../img/collectibles/placeholders/kitty.png"
|
|
|
|
property string collectibleDescription: "Avast ye! I'm the dread pirate Furbeard, and I'll most likely sleep"
|
|
|
|
property string buttonText: "View in Cryptokitties"
|
|
|
|
property string buttonLink: "https://www.cryptokitties.co/"
|
|
|
|
property var openModal: function (options) {
|
|
|
|
popup.collectibleName = options.name
|
|
|
|
popup.collectibleId = options.id
|
|
|
|
popup.collectibleDescription = options.description
|
|
|
|
popup.collectibleImage = options.image
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "View"
|
|
|
|
popup.buttonText = options.buttonText || qsTrId("view")
|
2020-08-19 15:58:25 +00:00
|
|
|
popup.buttonLink = options.link
|
|
|
|
popup.open()
|
|
|
|
}
|
|
|
|
|
|
|
|
id: popup
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "Unnamed"
|
|
|
|
title: collectibleName || qsTrId("unnamed")
|
2020-08-19 15:58:25 +00:00
|
|
|
|
|
|
|
CollectiblesModalContent {
|
|
|
|
collectibleName: popup.collectibleName
|
|
|
|
collectibleId: popup.collectibleId
|
|
|
|
collectibleImage: popup.collectibleImage
|
|
|
|
collectibleDescription: popup.collectibleDescription
|
|
|
|
}
|
|
|
|
|
2021-01-28 11:04:10 +00:00
|
|
|
footer: StatusButton {
|
2020-08-19 15:58:25 +00:00
|
|
|
visible: !!popup.buttonLink
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: Style.current.padding
|
2021-01-28 11:04:10 +00:00
|
|
|
text: popup.buttonText
|
2020-08-19 15:58:25 +00:00
|
|
|
anchors.top: parent.top
|
|
|
|
onClicked: {
|
2020-12-29 20:33:54 +00:00
|
|
|
appMain.openLink(popup.buttonLink)
|
2020-08-19 15:58:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|