mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-22 04:21:44 +00:00
feat: add assets and history in wallet popup
This commit is contained in:
parent
e45409b400
commit
4844e47771
@ -1,9 +1,11 @@
|
||||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.13
|
||||
import QtGraphicalEffects 1.13
|
||||
import "../../../shared"
|
||||
import "../../../shared/status"
|
||||
import "../../../imports"
|
||||
import "../Wallet"
|
||||
|
||||
Popup {
|
||||
id: popup
|
||||
@ -78,12 +80,12 @@ Popup {
|
||||
property string currentAddress: ""
|
||||
id: accountSelectorRow
|
||||
width: parent.width
|
||||
height: 44
|
||||
height: accountSelector.height
|
||||
anchors.top: walletHeader.bottom
|
||||
anchors.topMargin: Style.current.bigPadding
|
||||
|
||||
AccountSelector {
|
||||
id: accountRow
|
||||
id: accountSelector
|
||||
label: ""
|
||||
anchors.left: parent.left
|
||||
anchors.right: copyBtn.left
|
||||
@ -121,7 +123,7 @@ Popup {
|
||||
anchors.right: sendBtn.left
|
||||
anchors.rightMargin: Style.current.padding
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
textToCopy: accountRow.selectedAccount.address
|
||||
textToCopy: accountSelector.selectedAccount.address
|
||||
}
|
||||
|
||||
StatusIconButton {
|
||||
@ -135,4 +137,55 @@ Popup {
|
||||
onClicked: console.log("Send Tx")
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: walletInfoContent
|
||||
width: parent.width
|
||||
anchors.top: accountSelectorRow.bottom
|
||||
anchors.topMargin: Style.current.bigPadding
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
TabBar {
|
||||
id: walletTabBar
|
||||
width: parent.width
|
||||
anchors.top: parent.top
|
||||
height: assetBtn.height
|
||||
background: Rectangle {
|
||||
color: Style.current.transparent
|
||||
border.width: 0
|
||||
}
|
||||
|
||||
StatusTabButton {
|
||||
id: assetBtn
|
||||
//% "Assets"
|
||||
btnText: qsTrId("wallet-assets")
|
||||
anchors.top: parent.top
|
||||
}
|
||||
StatusTabButton {
|
||||
id: historyBtn
|
||||
anchors.top: parent.top
|
||||
anchors.left: assetBtn.right
|
||||
anchors.leftMargin: 32
|
||||
//% "History"
|
||||
btnText: qsTrId("history")
|
||||
onClicked: historyTab.checkIfHistoryIsBeingFetched()
|
||||
}
|
||||
}
|
||||
|
||||
StackLayout {
|
||||
id: stackLayout
|
||||
width: parent.width
|
||||
anchors.top: walletTabBar.bottom
|
||||
anchors.topMargin: Style.current.bigPadding
|
||||
anchors.bottom: parent.bottom
|
||||
currentIndex: walletTabBar.currentIndex
|
||||
|
||||
AssetsTab {
|
||||
id: assetsTab
|
||||
}
|
||||
HistoryTab {
|
||||
id: historyTab
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,15 +3,14 @@ import "../../../imports"
|
||||
import "../../../shared"
|
||||
|
||||
Item {
|
||||
height: assetListView.height
|
||||
Component {
|
||||
id: assetViewDelegate
|
||||
|
||||
Item {
|
||||
id: element
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 0
|
||||
height: 40
|
||||
|
||||
Image {
|
||||
@ -82,7 +81,7 @@ Item {
|
||||
|
||||
ListView {
|
||||
id: assetListView
|
||||
anchors.topMargin: 20
|
||||
spacing: Style.current.halfPadding
|
||||
anchors.fill: parent
|
||||
// model: exampleModel
|
||||
model: walletModel.assets
|
||||
|
@ -12,7 +12,7 @@ TabButton {
|
||||
padding: 0
|
||||
background: Rectangle {
|
||||
color: Style.current.transparent
|
||||
border.color: Style.current.transparent
|
||||
border.width: 0
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
Loading…
x
Reference in New Issue
Block a user