mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 13:56:10 +00:00
62183fb414
There are some inconcistencies in the application when it comes to button UI elements because we're using `StatusButton` in some places, in other we use `StyledButton`. The latter is the original component we've created when we started out building Status Desktop, but is planned to be removed entirely in favour of `StatusButton`. This commit replaces the usages of `StyledButton` with `StatusButton`
48 lines
1.6 KiB
QML
48 lines
1.6 KiB
QML
import QtQuick 2.13
|
|
import QtGraphicalEffects 1.13
|
|
import "../../../../../imports"
|
|
import "../../../../../shared"
|
|
import "../../../../../shared/status"
|
|
|
|
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
|
|
//% "View"
|
|
popup.buttonText = options.buttonText || qsTrId("view")
|
|
popup.buttonLink = options.link
|
|
popup.open()
|
|
}
|
|
|
|
id: popup
|
|
//% "Unnamed"
|
|
title: collectibleName || qsTrId("unnamed")
|
|
|
|
CollectiblesModalContent {
|
|
collectibleName: popup.collectibleName
|
|
collectibleId: popup.collectibleId
|
|
collectibleImage: popup.collectibleImage
|
|
collectibleDescription: popup.collectibleDescription
|
|
}
|
|
|
|
footer: StatusButton {
|
|
visible: !!popup.buttonLink
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: Style.current.padding
|
|
text: popup.buttonText
|
|
anchors.top: parent.top
|
|
onClicked: {
|
|
appMain.openLink(popup.buttonLink)
|
|
}
|
|
}
|
|
}
|
|
|