2021-08-17 14:22:29 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtGraphicalEffects 1.13
|
2021-09-08 15:41:38 +00:00
|
|
|
import "../../../../imports"
|
|
|
|
import "../../../../shared"
|
|
|
|
import "../../../../shared/status/core"
|
|
|
|
import "../components"
|
2021-08-17 14:22:29 +00:00
|
|
|
|
2021-09-08 09:14:02 +00:00
|
|
|
import StatusQ.Components 0.1
|
|
|
|
|
2021-08-17 14:22:29 +00:00
|
|
|
Item {
|
2021-09-08 09:14:02 +00:00
|
|
|
id: collectiblesTab
|
2021-08-17 14:22:29 +00:00
|
|
|
|
|
|
|
Loader {
|
|
|
|
id: contentLoader
|
|
|
|
width: parent.width
|
|
|
|
height: parent.height
|
|
|
|
|
|
|
|
sourceComponent: {
|
|
|
|
if (walletV2Model.collectiblesView.isLoading) {
|
|
|
|
return loading
|
|
|
|
}
|
|
|
|
if (walletV2Model.collectiblesView.collections.rowCount() == 0) {
|
|
|
|
return empty
|
|
|
|
}
|
|
|
|
|
|
|
|
return loaded
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: loading
|
|
|
|
|
|
|
|
Item {
|
|
|
|
StatusLoadingIndicator {
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
width: 20
|
|
|
|
height: 20
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: empty
|
|
|
|
Item {
|
|
|
|
StyledText {
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
color: Style.current.secondaryText
|
|
|
|
text: qsTr("Collectibles will appear here")
|
|
|
|
font.pixelSize: 15
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: loaded
|
|
|
|
|
|
|
|
ScrollView {
|
|
|
|
id: scrollView
|
|
|
|
clip: true
|
|
|
|
|
|
|
|
Column {
|
|
|
|
id: collectiblesSection
|
2021-09-08 09:14:02 +00:00
|
|
|
width: collectiblesTab.width
|
2021-08-17 14:22:29 +00:00
|
|
|
|
|
|
|
Repeater {
|
|
|
|
id: collectionsRepeater
|
|
|
|
model: walletV2Model.collectiblesView.collections
|
|
|
|
|
2021-09-08 09:14:02 +00:00
|
|
|
StatusExpandableItem {
|
|
|
|
width: parent.width - 156
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
|
|
primaryText: model.name
|
|
|
|
image.source: model.imageUrl
|
|
|
|
type: StatusExpandableItem.Type.Secondary
|
|
|
|
expandableComponent: CollectibleCollection {
|
|
|
|
slug: model.slug
|
|
|
|
collectionImageUrl: model.imageUrl
|
2021-09-10 13:11:34 +00:00
|
|
|
collectionIndex: model.index
|
2021-09-08 09:14:02 +00:00
|
|
|
}
|
2021-08-17 14:22:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|