diff --git a/ui/StatusQ/src/StatusQ/Layout/StatusSectionLayout.qml b/ui/StatusQ/src/StatusQ/Layout/StatusSectionLayout.qml index 0f7e7f1bb9..ea4556bd4b 100644 --- a/ui/StatusQ/src/StatusQ/Layout/StatusSectionLayout.qml +++ b/ui/StatusQ/src/StatusQ/Layout/StatusSectionLayout.qml @@ -66,6 +66,11 @@ SplitView { This property holds the right panel of the component. */ property Component rightPanel + /*! + \qmlproperty Component StatusAppLayout::footer + This property holds the footer of the component. + */ + property Item footer /*! \qmlproperty bool StatusAppLayout::showRightPanel @@ -134,6 +139,12 @@ SplitView { } } + onFooterChanged: { + if (!!footer) { + footer.parent = footerSlot + } + } + Control { SplitView.minimumWidth: (!!leftPanel) ? 304 : 0 SplitView.preferredWidth: (!!leftPanel) ? 304 : 0 @@ -167,7 +178,15 @@ SplitView { id: centerPanelSlot width: parent.width anchors.top: statusToolBar.bottom + anchors.bottom: footerSlot.top + anchors.bottomMargin: footerSlot.visible ? 8 : 0 + } + Item { + id: footerSlot + width: parent.width + height: visible ? childrenRect.height : 0 anchors.bottom: parent.bottom + visible: (!!footer) } } } diff --git a/ui/app/AppLayouts/Wallet/WalletLayout.qml b/ui/app/AppLayouts/Wallet/WalletLayout.qml index c71496ca3b..eadd79e636 100644 --- a/ui/app/AppLayouts/Wallet/WalletLayout.qml +++ b/ui/app/AppLayouts/Wallet/WalletLayout.qml @@ -96,6 +96,7 @@ Item { rightPanelStackView.replace(cmpSavedAddresses) else rightPanelStackView.replace(walletContainer) + RootStore.backButtonName = "" } emojiPopup: root.emojiPopup networkConnectionStore: root.networkConnectionStore @@ -114,5 +115,12 @@ Item { NumberAnimation { property: "opacity"; from: 1; to: 0; duration: 400; easing.type: Easing.OutCubic } } } + + footer: WalletFooter { + sendModal: root.sendModalPopup + width: parent.width + walletStore: RootStore + networkConnectionStore: root.networkConnectionStore + } } } diff --git a/ui/app/AppLayouts/Wallet/views/RightTabView.qml b/ui/app/AppLayouts/Wallet/views/RightTabView.qml index c9d5f735d5..ded6391608 100644 --- a/ui/app/AppLayouts/Wallet/views/RightTabView.qml +++ b/ui/app/AppLayouts/Wallet/views/RightTabView.qml @@ -42,112 +42,97 @@ Item { } } - ColumnLayout { + StackLayout { + id: stack anchors.fill: parent - - StackLayout { - id: stack - Layout.fillWidth: true - Layout.preferredHeight: parent.height - footer.height - onCurrentIndexChanged: { - RootStore.backButtonName = d.getBackButtonText(currentIndex) - } - - ColumnLayout { - WalletHeader { - Layout.fillWidth: true - overview: RootStore.overview - store: root.store - walletStore: RootStore - networkConnectionStore: root.networkConnectionStore - } - StatusTabBar { - id: walletTabBar - objectName: "rightSideWalletTabBar" - horizontalPadding: Style.current.padding - Layout.fillWidth: true - Layout.topMargin: Style.current.padding - - 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.topMargin: Style.current.padding - Layout.bottomMargin: Style.current.padding - currentIndex: walletTabBar.currentIndex - - AssetsView { - account: RootStore.currentAccount - networkConnectionStore: root.networkConnectionStore - assetDetailsLaunched: stack.currentIndex === 2 - onAssetClicked: { - assetDetailView.token = token - stack.currentIndex = 2 - } - } - CollectiblesView { - collectiblesModel: RootStore.flatCollectibles - onCollectibleClicked: { - RootStore.selectCollectible(address, tokenId) - stack.currentIndex = 1 - } - } - HistoryView { - assets: RootStore.assets - onLaunchTransactionDetail: { - transactionDetailView.transaction = transaction - stack.currentIndex = 3 - } - } - } - } - CollectibleDetailView { - Layout.fillWidth: true - Layout.fillHeight: true - } - AssetsDetailView { - id: assetDetailView - - Layout.fillWidth: true - Layout.fillHeight: true - visible: (stack.currentIndex === 2) - - account: RootStore.currentAccount - address: RootStore.currentAccount.address - networkConnectionStore: root.networkConnectionStore - } - TransactionDetailView { - id: transactionDetailView - Layout.fillWidth: true - Layout.fillHeight: true - sendModal: root.sendModal - contactsStore: root.contactsStore - visible: (stack.currentIndex === 3) - } + onCurrentIndexChanged: { + RootStore.backButtonName = d.getBackButtonText(currentIndex) } - WalletFooter { - id: footer + ColumnLayout { + WalletHeader { + Layout.fillWidth: true + overview: RootStore.overview + store: root.store + walletStore: RootStore + networkConnectionStore: root.networkConnectionStore + } + StatusTabBar { + id: walletTabBar + objectName: "rightSideWalletTabBar" + horizontalPadding: Style.current.padding + Layout.fillWidth: true + Layout.topMargin: Style.current.padding + + 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.topMargin: Style.current.padding + Layout.bottomMargin: Style.current.padding + currentIndex: walletTabBar.currentIndex + + AssetsView { + account: RootStore.currentAccount + networkConnectionStore: root.networkConnectionStore + assetDetailsLaunched: stack.currentIndex === 2 + onAssetClicked: { + assetDetailView.token = token + stack.currentIndex = 2 + } + } + CollectiblesView { + collectiblesModel: RootStore.flatCollectibles + onCollectibleClicked: { + RootStore.selectCollectible(address, tokenId) + stack.currentIndex = 1 + } + } + HistoryView { + assets: RootStore.assets + onLaunchTransactionDetail: { + transactionDetailView.transaction = transaction + stack.currentIndex = 3 + } + } + } + } + CollectibleDetailView { Layout.fillWidth: true - Layout.leftMargin: !!root.StackView ? -root.StackView.view.anchors.leftMargin : 0 - Layout.rightMargin: !!root.StackView ? -root.StackView.view.anchors.rightMargin : 0 - sendModal: root.sendModal - walletStore: RootStore + Layout.fillHeight: true + } + AssetsDetailView { + id: assetDetailView + + Layout.fillWidth: true + Layout.fillHeight: true + visible: (stack.currentIndex === 2) + + account: RootStore.currentAccount + address: RootStore.currentAccount.address networkConnectionStore: root.networkConnectionStore } + TransactionDetailView { + id: transactionDetailView + Layout.fillWidth: true + Layout.fillHeight: true + sendModal: root.sendModal + contactsStore: root.contactsStore + visible: (stack.currentIndex === 3) + } } } diff --git a/ui/app/AppLayouts/Wallet/views/SavedAddressesView.qml b/ui/app/AppLayouts/Wallet/views/SavedAddressesView.qml index 7f376a56b5..5c63158792 100644 --- a/ui/app/AppLayouts/Wallet/views/SavedAddressesView.qml +++ b/ui/app/AppLayouts/Wallet/views/SavedAddressesView.qml @@ -1,5 +1,6 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 +import QtQuick.Layouts 1.13 import utils 1.0 @@ -100,23 +101,20 @@ Item { StatusListView { id: listView objectName: "SavedAddressesView_savedAddresses" - anchors.top: errorMessage.bottom + anchors.top: header.bottom anchors.topMargin: Style.current.padding anchors.bottom: parent.bottom - anchors.bottomMargin: Style.current.halfPadding anchors.right: parent.right anchors.left: parent.left - visible: listView.count > 0 spacing: 5 + visible: count > 0 model: SortFilterProxyModel { sourceModel: RootStore.savedAddresses sorters: RoleSorter { roleName: "createdAt"; sortOrder: Qt.DescendingOrder } } delegate: SavedAddressesDelegate { id: savedAddressDelegate - objectName: "savedAddressView_Delegate_" + name - name: model.name address: model.address chainShortNames: model.chainShortNames