status-desktop/ui/app/AppLayouts/Wallet/CollectiblesTab.qml

78 lines
2.4 KiB
QML
Raw Normal View History

2020-06-17 19:18:31 +00:00
import QtQuick 2.13
2020-08-18 18:46:11 +00:00
import QtGraphicalEffects 1.13
import "../../../imports"
import "../../../shared"
import "./components/collectiblesComponents"
import "./components/collectiblesComponents/collectiblesData.js" as CollectiblesData
2020-05-28 14:54:42 +00:00
Item {
2020-08-18 18:46:11 +00:00
id: root
2020-07-28 18:19:46 +00:00
StyledText {
id: noCollectiblesText
color: Style.current.secondaryText
2020-08-26 15:52:26 +00:00
//% "Collectibles will appear here"
text: qsTrId("collectibles-will-appear-here")
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 15
}
CollectiblesModal {
id: collectiblesModalComponent
}
function checkCollectiblesVisibility() {
// Show the collectibles section only if at least one of the sub-items is visible
// Sub-items are visible only if they are loading or have more than zero collectible
let showCollectibles = false
let currentItem
for (let i = 0; i < collectiblesRepeater.count; i++) {
currentItem = collectiblesRepeater.itemAt(i)
if (currentItem && currentItem.active) {
showCollectibles = true
break
}
}
noCollectiblesText.visible = !showCollectibles
collectiblesSection.visible = showCollectibles
}
2020-08-18 18:46:11 +00:00
Column {
id: collectiblesSection
spacing: Style.current.halfPadding
anchors.fill: parent
Repeater {
id: collectiblesRepeater
refactor wallet views add getSettings methods to src/status fix issue with calling getSettings; document issue remove most direct references to libstatus; document some common issues remove most references to libstatus wallet add mailserver layer to status lib; remove references to libstatus mailservers remove libstatus accounts references move types out of libstatus; remove libstatus types references remove libstatus browser references refactor libstatus utils references remove more references to libstatus stickers remove references to libstatus constants from src/app remove more libstatus references from src/app refactor token_list usage of libstatus refactor stickers usage of libstatus refactor chat usage of libstatus remove libstatus references from the wallet view remove logic from ens manager view fix issue with import & namespace conflict remove unnecessary imports refactor provider view to not depend on libstatus refactor provider view refactor: move accounts specific code to its own section fix account selection move collectibles to their own module update references to wallet transactions refactor: move gas methods to their own file refactor: extract tokens into their own file refactor: extract ens to its own file refactor: extract dappbrowser code to its own file refactor: extract history related code to its own file refactor: extract balance to its own file refactor: extract utils to its own file clean up wallet imports fix: identicon for transaction commands Fixes #2533
2021-06-08 12:48:31 +00:00
model: walletModel.collectiblesView.collectiblesLists
CollectiblesContainer {
property var collectibleData: CollectiblesData.collectiblesData[model.collectibleType]
collectibleName: collectibleData.collectibleName
collectibleIconSource: "../../img/collectibles/" + collectibleData.collectibleIconSource
collectiblesModal: collectiblesModalComponent
buttonText: collectibleData.buttonText
getLink: collectibleData.getLink
2020-08-27 14:41:50 +00:00
onActiveChanged: {
checkCollectiblesVisibility()
}
}
2020-08-18 18:46:11 +00:00
}
2020-07-28 18:19:46 +00:00
}
Connections {
refactor wallet views add getSettings methods to src/status fix issue with calling getSettings; document issue remove most direct references to libstatus; document some common issues remove most references to libstatus wallet add mailserver layer to status lib; remove references to libstatus mailservers remove libstatus accounts references move types out of libstatus; remove libstatus types references remove libstatus browser references refactor libstatus utils references remove more references to libstatus stickers remove references to libstatus constants from src/app remove more libstatus references from src/app refactor token_list usage of libstatus refactor stickers usage of libstatus refactor chat usage of libstatus remove libstatus references from the wallet view remove logic from ens manager view fix issue with import & namespace conflict remove unnecessary imports refactor provider view to not depend on libstatus refactor provider view refactor: move accounts specific code to its own section fix account selection move collectibles to their own module update references to wallet transactions refactor: move gas methods to their own file refactor: extract tokens into their own file refactor: extract ens to its own file refactor: extract dappbrowser code to its own file refactor: extract history related code to its own file refactor: extract balance to its own file refactor: extract utils to its own file clean up wallet imports fix: identicon for transaction commands Fixes #2533
2021-06-08 12:48:31 +00:00
target: walletModel.collectiblesView.collectiblesLists
onDataChanged: {
checkCollectiblesVisibility()
}
}
2020-05-28 14:54:42 +00:00
}
2020-06-17 19:18:31 +00:00
/*##^##
Designer {
D{i:0;autoSize:true;formeditorColor:"#ffffff";height:480;width:640}
2020-06-17 19:18:31 +00:00
}
##^##*/