fix(@wallet): Collection without assets
fixes #3808 In some cases, the opensea API return collection for an owner without assets, we handle this case in the UI
This commit is contained in:
parent
04f6d022ab
commit
5eb582b18c
|
@ -4,6 +4,7 @@ import QtGraphicalEffects 1.13
|
|||
|
||||
import StatusQ.Components 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import shared.panels 1.0
|
||||
|
||||
import "../../stores"
|
||||
|
||||
|
@ -31,7 +32,15 @@ Item {
|
|||
anchors.top: parent.top
|
||||
anchors.topMargin: 16
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
sourceComponent: root.collectiblesLoaded ? loaded : loading
|
||||
sourceComponent: {
|
||||
if (!root.collectiblesLoaded) {
|
||||
return loading
|
||||
}
|
||||
if (RootStore.getCollectionCollectiblesList(root.slug).count == 0) {
|
||||
return empty
|
||||
}
|
||||
return loaded
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
|
@ -49,6 +58,22 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: empty
|
||||
|
||||
Item {
|
||||
id: emptyContainer
|
||||
height: 164
|
||||
StyledText {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: Style.current.secondaryText
|
||||
text: qsTr("No collectibles available")
|
||||
font.pixelSize: 15
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: loaded
|
||||
|
||||
|
|
Loading…
Reference in New Issue