2021-10-21 08:22:05 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
|
|
|
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
2022-07-28 20:56:44 +00:00
|
|
|
import utils 1.0
|
|
|
|
import shared.controls 1.0
|
|
|
|
|
2021-12-06 21:10:54 +00:00
|
|
|
import "../../stores"
|
2021-10-21 08:22:05 +00:00
|
|
|
import "../../controls"
|
|
|
|
|
2022-07-28 20:56:44 +00:00
|
|
|
Item {
|
2021-10-21 08:22:05 +00:00
|
|
|
id: root
|
|
|
|
|
2022-11-22 19:31:07 +00:00
|
|
|
property var currentCollectible: RootStore.currentCollectible
|
|
|
|
|
2021-10-21 08:22:05 +00:00
|
|
|
CollectibleDetailsHeader {
|
|
|
|
id: collectibleHeader
|
2022-07-28 20:56:44 +00:00
|
|
|
anchors.top: parent.top
|
2021-10-21 08:22:05 +00:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
2022-11-22 19:31:07 +00:00
|
|
|
asset.name: currentCollectible.collectionImageUrl
|
2022-08-11 11:55:08 +00:00
|
|
|
asset.isImage: true
|
2022-11-22 19:31:07 +00:00
|
|
|
primaryText: currentCollectible.name
|
|
|
|
secondaryText: currentCollectible.id
|
2021-10-21 08:22:05 +00:00
|
|
|
}
|
|
|
|
|
2022-07-28 20:56:44 +00:00
|
|
|
ColumnLayout {
|
2021-10-21 08:22:05 +00:00
|
|
|
anchors.top: collectibleHeader.bottom
|
|
|
|
anchors.topMargin: 46
|
2022-07-28 20:56:44 +00:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
|
|
|
spacing: Style.current.padding
|
2021-10-21 08:22:05 +00:00
|
|
|
|
|
|
|
Row {
|
|
|
|
id: collectibleImageDetails
|
2022-07-28 20:56:44 +00:00
|
|
|
Layout.preferredWidth: parent.width
|
2021-10-21 08:22:05 +00:00
|
|
|
spacing: 24
|
|
|
|
|
|
|
|
StatusRoundedImage {
|
|
|
|
id: collectibleimage
|
|
|
|
width: 253
|
|
|
|
height: 253
|
|
|
|
radius: 2
|
2022-11-22 19:31:07 +00:00
|
|
|
color: currentCollectible.backgroundColor
|
2021-10-21 08:22:05 +00:00
|
|
|
border.color: Theme.palette.directColor8
|
|
|
|
border.width: 1
|
2022-11-22 19:31:07 +00:00
|
|
|
image.source: currentCollectible.imageUrl
|
2021-10-21 08:22:05 +00:00
|
|
|
}
|
|
|
|
StatusBaseText {
|
|
|
|
id: collectibleText
|
2022-07-28 20:56:44 +00:00
|
|
|
width: parent.width - collectibleimage.width - Style.current.bigPadding
|
2021-10-21 08:22:05 +00:00
|
|
|
height: collectibleimage.height
|
|
|
|
|
2022-11-22 19:31:07 +00:00
|
|
|
text: currentCollectible.description
|
2021-10-21 08:22:05 +00:00
|
|
|
color: Theme.palette.directColor1
|
|
|
|
font.pixelSize: 15
|
|
|
|
lineHeight: 22
|
|
|
|
lineHeightMode: Text.FixedHeight
|
|
|
|
elide: Text.ElideRight
|
|
|
|
wrapMode: Text.Wrap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-28 20:56:44 +00:00
|
|
|
StatusTabBar {
|
|
|
|
id: collectiblesDetailsTab
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.topMargin: Style.current.xlPadding
|
2022-11-22 19:31:07 +00:00
|
|
|
visible: currentCollectible.properties.count > 0
|
2021-10-21 08:22:05 +00:00
|
|
|
|
2022-07-28 20:56:44 +00:00
|
|
|
StatusTabButton {
|
|
|
|
leftPadding: 0
|
|
|
|
width: implicitWidth
|
|
|
|
text: qsTr("Properties")
|
2021-10-21 08:22:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-28 20:56:44 +00:00
|
|
|
StackLayout {
|
|
|
|
Flow {
|
|
|
|
width: parent.width
|
|
|
|
spacing: 10
|
|
|
|
Repeater {
|
2022-11-22 19:31:07 +00:00
|
|
|
model: currentCollectible.properties
|
2022-07-28 20:56:44 +00:00
|
|
|
InformationTile {
|
|
|
|
maxWidth: parent.width
|
|
|
|
primaryText: model.traitType
|
|
|
|
secondaryText: model.value
|
2021-10-21 08:22:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|