From 3ce1883c0b4f556020e0ee088b6f0d8c9cd2ae46 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Thu, 28 May 2020 10:54:42 -0400 Subject: [PATCH] feat: add files for the wallet tabs --- ui/app/AppLayouts/Wallet/AssetsTab.qml | 66 +++++++++++++++++ ui/app/AppLayouts/Wallet/CollectiblesTab.qml | 8 ++ ui/app/AppLayouts/Wallet/HistoryTab.qml | 8 ++ ui/app/AppLayouts/Wallet/WalletLayout.qml | 78 ++++++-------------- ui/app/AppLayouts/Wallet/qmldir | 2 + ui/nim-status-client.pro | 3 + 6 files changed, 108 insertions(+), 57 deletions(-) create mode 100644 ui/app/AppLayouts/Wallet/AssetsTab.qml create mode 100644 ui/app/AppLayouts/Wallet/CollectiblesTab.qml create mode 100644 ui/app/AppLayouts/Wallet/HistoryTab.qml diff --git a/ui/app/AppLayouts/Wallet/AssetsTab.qml b/ui/app/AppLayouts/Wallet/AssetsTab.qml new file mode 100644 index 0000000000..97162740a8 --- /dev/null +++ b/ui/app/AppLayouts/Wallet/AssetsTab.qml @@ -0,0 +1,66 @@ +import QtQuick 2.0 + +Item { + Component { + id: assetViewDelegate + + Item { + anchors.right: parent.right + anchors.rightMargin: 0 + anchors.left: parent.left + anchors.leftMargin: 0 + + Image { + id: assetInfoImage + width: 36 + height: 36 + source: image + anchors.left: parent.left + anchors.leftMargin: Theme.padding + anchors.verticalCenter: parent.verticalCenter + } + + Text { + id: assetValue + text: value + anchors.verticalCenter: parent.verticalCenter + font.pixelSize: 14 + font.strikeout: false + anchors.left: parent.left + anchors.leftMargin: 72 + } + Text { + id: assetSymbol + text: symbol + anchors.verticalCenter: parent.verticalCenter + color: Theme.darkGrey + font.pixelSize: 14 + anchors.right: assetFiatValue.left + anchors.rightMargin: 10 + } + Text { + id: assetFiatValue + color: Theme.darkGrey + text: fiatValue + anchors.verticalCenter: parent.verticalCenter + font.pixelSize: 14 + anchors.right: parent.right + anchors.rightMargin: Theme.padding + } + } + } + + + ListView { + id: assetListView + anchors.topMargin: 0 + anchors.fill: parent + model: assetsModel.assets + delegate: assetViewDelegate + } +} +/*##^## +Designer { + D{i:0;autoSize:true;formeditorColor:"#ffffff";height:480;width:640} +} +##^##*/ diff --git a/ui/app/AppLayouts/Wallet/CollectiblesTab.qml b/ui/app/AppLayouts/Wallet/CollectiblesTab.qml new file mode 100644 index 0000000000..848444eded --- /dev/null +++ b/ui/app/AppLayouts/Wallet/CollectiblesTab.qml @@ -0,0 +1,8 @@ +import QtQuick 2.3 + +Item { + Text { + id: name2 + text: "Collectibles" + } +} diff --git a/ui/app/AppLayouts/Wallet/HistoryTab.qml b/ui/app/AppLayouts/Wallet/HistoryTab.qml new file mode 100644 index 0000000000..a115f6bfa8 --- /dev/null +++ b/ui/app/AppLayouts/Wallet/HistoryTab.qml @@ -0,0 +1,8 @@ +import QtQuick 2.3 + +Item { + Text { + id: name3 + text: "HISTORY" + } +} diff --git a/ui/app/AppLayouts/Wallet/WalletLayout.qml b/ui/app/AppLayouts/Wallet/WalletLayout.qml index 2b2d74be4d..2a5c03b813 100644 --- a/ui/app/AppLayouts/Wallet/WalletLayout.qml +++ b/ui/app/AppLayouts/Wallet/WalletLayout.qml @@ -34,7 +34,7 @@ SplitView { } RowLayout { - id: assetInfoContainer + id: walletInfoContainer anchors.bottom: parent.bottom anchors.bottomMargin: 0 anchors.left: parent.left @@ -45,7 +45,7 @@ SplitView { anchors.topMargin: 23 Item { - id: element + id: walletInfoContent Layout.fillHeight: true Layout.fillWidth: true @@ -57,6 +57,7 @@ SplitView { anchors.leftMargin: Theme.bigPadding anchors.top: parent.top anchors.topMargin: Theme.padding + height: assetBtn.height StatusTabButton { id: assetBtn @@ -76,63 +77,26 @@ SplitView { } } - Component { - id: assetViewDelegate + StackLayout { + id: stackLayout + anchors.rightMargin: Theme.bigPadding + anchors.leftMargin: Theme.bigPadding + anchors.top: walletTabBar.bottom + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.topMargin: Theme.bigPadding + currentIndex: walletTabBar.currentIndex - Item { - id: element6 - height: 56 - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 0 - - Image { - id: assetInfoContainer - width: 36 - height: 36 - source: image - anchors.left: parent.left - anchors.leftMargin: Theme.padding - anchors.verticalCenter: parent.verticalCenter - } - - Text { - id: assetValue - text: value - anchors.verticalCenter: parent.verticalCenter - font.pixelSize: 14 - font.strikeout: false - anchors.left: parent.left - anchors.leftMargin: 72 - } - Text { - id: assetSymbol - text: symbol - anchors.verticalCenter: parent.verticalCenter - color: Theme.darkGrey - font.pixelSize: 14 - anchors.right: assetFiatValue.left - anchors.rightMargin: 10 - } - Text { - id: assetFiatValue - color: Theme.darkGrey - text: fiatValue - anchors.verticalCenter: parent.verticalCenter - font.pixelSize: 14 - anchors.right: parent.right - anchors.rightMargin: Theme.padding - } + AssetsTab { + id: assetsTab + } + CollectiblesTab { + id: collectiblesTab + } + HistoryTab { + id: historyTab } - } - - ListView { - id: listView - anchors.topMargin: 36 - anchors.fill: parent - model: assetsModel.assets - delegate: assetViewDelegate } } } diff --git a/ui/app/AppLayouts/Wallet/qmldir b/ui/app/AppLayouts/Wallet/qmldir index 87c29ae575..2d4d873368 100644 --- a/ui/app/AppLayouts/Wallet/qmldir +++ b/ui/app/AppLayouts/Wallet/qmldir @@ -1,2 +1,4 @@ LeftTab 1.0 LeftTab.qml WalletHeader 1.0 WalletHeader.qml +AssetsTab 1.0 AssetsTab.qml +CollectiblesTab 1.0 CollectiblesTab.qml diff --git a/ui/nim-status-client.pro b/ui/nim-status-client.pro index 9f553c9e15..62ac6cb928 100644 --- a/ui/nim-status-client.pro +++ b/ui/nim-status-client.pro @@ -63,6 +63,9 @@ DISTFILES += \ app/AppLayouts/Node/NodeLayout.qml \ app/AppLayouts/Profile/LeftTab/qmldir \ app/AppLayouts/Profile/ProfileLayout.qml \ + app/AppLayouts/Wallet/AssetsTab.qml \ + app/AppLayouts/Wallet/CollectiblesTab.qml \ + app/AppLayouts/Wallet/HistoryTab.qml \ app/AppLayouts/Wallet/LeftTab.qml \ app/AppLayouts/Wallet/SendModal.qml \ app/AppLayouts/Wallet/WalletHeader.qml \