2021-10-05 20:50:22 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
|
|
|
|
2022-05-23 11:45:29 +00:00
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
2021-10-05 20:50:22 +00:00
|
|
|
import utils 1.0
|
2022-03-25 08:46:47 +00:00
|
|
|
import shared.views 1.0
|
2021-10-27 21:27:49 +00:00
|
|
|
|
2021-10-05 20:50:22 +00:00
|
|
|
import "../stores"
|
|
|
|
import "../panels"
|
2022-07-28 20:56:44 +00:00
|
|
|
import "../views/collectibles"
|
2021-10-05 20:50:22 +00:00
|
|
|
|
|
|
|
Item {
|
2022-07-19 13:17:35 +00:00
|
|
|
id: root
|
2021-10-05 20:50:22 +00:00
|
|
|
|
|
|
|
property alias currentTabIndex: walletTabBar.currentIndex
|
2022-01-31 13:29:27 +00:00
|
|
|
property var store
|
2022-03-23 11:08:49 +00:00
|
|
|
property var sendModal
|
2021-10-05 20:50:22 +00:00
|
|
|
|
2022-03-23 11:08:49 +00:00
|
|
|
ColumnLayout {
|
2022-07-28 20:56:44 +00:00
|
|
|
anchors.fill: parent
|
2021-10-05 20:50:22 +00:00
|
|
|
|
2022-07-28 20:56:44 +00:00
|
|
|
StackLayout {
|
|
|
|
id: stack
|
2021-10-05 20:50:22 +00:00
|
|
|
Layout.fillWidth: true
|
2022-07-28 20:56:44 +00:00
|
|
|
Layout.preferredHeight: parent.height - footer.height
|
2021-10-05 20:50:22 +00:00
|
|
|
|
2022-07-28 20:56:44 +00:00
|
|
|
ColumnLayout {
|
|
|
|
anchors.fill: parent
|
|
|
|
WalletHeader {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.leftMargin: Style.current.padding
|
|
|
|
Layout.rightMargin: Style.current.padding
|
|
|
|
locale: RootStore.locale
|
|
|
|
currency: RootStore.currentCurrency
|
|
|
|
currentAccount: RootStore.currentAccount
|
|
|
|
store: root.store
|
|
|
|
walletStore: RootStore
|
|
|
|
}
|
|
|
|
StatusTabBar {
|
|
|
|
id: walletTabBar
|
2022-08-10 14:26:29 +00:00
|
|
|
objectName: "rightSideWalletTabBar"
|
2022-07-28 20:56:44 +00:00
|
|
|
horizontalPadding: Style.current.padding
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.topMargin: Style.current.padding
|
2021-10-05 20:50:22 +00:00
|
|
|
|
2022-07-28 20:56:44 +00:00
|
|
|
StatusTabButton {
|
|
|
|
leftPadding: 0
|
|
|
|
width: implicitWidth
|
|
|
|
text: qsTr("Assets")
|
|
|
|
}
|
|
|
|
StatusTabButton {
|
|
|
|
width: implicitWidth
|
|
|
|
text: qsTr("Collectibles")
|
|
|
|
}
|
|
|
|
StatusTabButton {
|
|
|
|
rightPadding: 0
|
|
|
|
width: implicitWidth
|
|
|
|
text: qsTr("Activity")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
StackLayout {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.margins: Style.current.padding
|
|
|
|
currentIndex: walletTabBar.currentIndex
|
2021-10-05 20:50:22 +00:00
|
|
|
|
2022-07-28 20:56:44 +00:00
|
|
|
AssetsView {
|
|
|
|
account: RootStore.currentAccount
|
2022-08-08 21:12:12 +00:00
|
|
|
assetDetailsLaunched: stack.currentIndex === 2
|
|
|
|
onAssetClicked: {
|
|
|
|
assetDetailView.token = token
|
|
|
|
stack.currentIndex = 2
|
|
|
|
}
|
2022-07-28 20:56:44 +00:00
|
|
|
}
|
|
|
|
CollectiblesView {
|
|
|
|
onCollectibleClicked: {
|
|
|
|
stack.currentIndex = 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
HistoryView {
|
|
|
|
account: RootStore.currentAccount
|
|
|
|
}
|
|
|
|
}
|
2022-07-19 13:17:35 +00:00
|
|
|
}
|
2022-07-28 20:56:44 +00:00
|
|
|
CollectibleDetailView {
|
2022-08-08 21:12:12 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
onGoBack: stack.currentIndex = 0
|
|
|
|
}
|
|
|
|
AssetsDetailView {
|
|
|
|
id: assetDetailView
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2022-07-28 20:56:44 +00:00
|
|
|
onGoBack: stack.currentIndex = 0
|
2021-10-05 20:50:22 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-23 11:08:49 +00:00
|
|
|
|
|
|
|
WalletFooter {
|
2022-07-28 20:56:44 +00:00
|
|
|
id: footer
|
2022-03-23 11:08:49 +00:00
|
|
|
Layout.fillWidth: true
|
2022-07-19 13:17:35 +00:00
|
|
|
Layout.leftMargin: -root.StackView.view.anchors.leftMargin
|
|
|
|
Layout.rightMargin: -root.StackView.view.anchors.rightMargin
|
|
|
|
sendModal: root.sendModal
|
2022-07-20 11:15:05 +00:00
|
|
|
walletStore: RootStore
|
2022-03-23 11:08:49 +00:00
|
|
|
}
|
2021-10-05 20:50:22 +00:00
|
|
|
}
|
|
|
|
}
|