mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-21 19:18:53 +00:00
refactor(WalletLayout): use StatusQ two panel layout
This commit is contained in:
parent
8d48ebf864
commit
88ca3b9bbf
@ -11,7 +11,6 @@ Rectangle {
|
||||
id: root
|
||||
visible: !profileModel.mnemonic.isBackedUp
|
||||
height: visible ? 32 : 0
|
||||
Layout.fillWidth: true
|
||||
color: Style.current.red
|
||||
|
||||
Row {
|
||||
@ -90,4 +89,4 @@ Rectangle {
|
||||
id: backupSeedModal
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -5,68 +5,59 @@ import "../../../imports"
|
||||
import "../../../shared"
|
||||
import "."
|
||||
|
||||
ColumnLayout {
|
||||
import StatusQ.Layout 0.1
|
||||
|
||||
Item {
|
||||
id: walletView
|
||||
|
||||
property bool hideSignPhraseModal: false
|
||||
|
||||
SignPhraseModal {
|
||||
id: signPhrasePopup
|
||||
}
|
||||
|
||||
function showSigningPhrasePopup(){
|
||||
if(!hideSignPhraseModal && !appSettings.hideSignPhraseModal){
|
||||
signPhrasePopup.open();
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if(onboardingModel.firstTimeLogin){
|
||||
onboardingModel.firstTimeLogin = false
|
||||
walletModel.setInitialRange()
|
||||
}
|
||||
walletModel.transactionsView.checkRecentHistory()
|
||||
SignPhraseModal {
|
||||
id: signPhrasePopup
|
||||
}
|
||||
|
||||
SeedPhraseBackupWarning {
|
||||
id: seedPhraseWarning
|
||||
width: parent.width
|
||||
anchors.top: parent.top
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: recentHistoryTimer
|
||||
interval: Constants.walletFetchRecentHistoryInterval
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: walletModel.transactionsView.checkRecentHistory()
|
||||
}
|
||||
|
||||
SeedPhraseBackupWarning { }
|
||||
|
||||
SplitView {
|
||||
id: walletView
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
StatusAppTwoPanelLayout {
|
||||
anchors.top: seedPhraseWarning.bottom
|
||||
height: walletView.height - seedPhraseWarning.height
|
||||
width: walletView.width
|
||||
|
||||
handle: SplitViewHandle {}
|
||||
|
||||
Connections {
|
||||
target: appMain
|
||||
onSettingsLoaded: {
|
||||
// Add recent
|
||||
walletView.restoreState(appSettings.walletSplitView)
|
||||
Component.onCompleted: {
|
||||
if(onboardingModel.firstTimeLogin){
|
||||
onboardingModel.firstTimeLogin = false
|
||||
walletModel.setInitialRange()
|
||||
}
|
||||
}
|
||||
Component.onDestruction: appSettings.walletSplitView = this.saveState()
|
||||
|
||||
LeftTab {
|
||||
id: leftTab
|
||||
SplitView.preferredWidth: Style.current.leftTabPreferredSize
|
||||
Timer {
|
||||
id: recentHistoryTimer
|
||||
interval: Constants.walletFetchRecentHistoryInterval
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: walletModel.transactionsView.checkRecentHistory()
|
||||
}
|
||||
|
||||
Item {
|
||||
leftPanel: LeftTab {
|
||||
id: leftTab
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
rightPanel: Item {
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
id: walletContainer
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 0
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 0
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
anchors.left: leftTab.right
|
||||
anchors.leftMargin: 0
|
||||
|
||||
WalletHeader {
|
||||
id: walletHeader
|
||||
@ -101,7 +92,6 @@ ColumnLayout {
|
||||
background: Rectangle {
|
||||
color: Style.current.transparent
|
||||
}
|
||||
|
||||
StatusTabButton {
|
||||
id: assetBtn
|
||||
//% "Assets"
|
||||
@ -120,6 +110,7 @@ ColumnLayout {
|
||||
anchors.leftMargin: 32
|
||||
//% "History"
|
||||
btnText: qsTrId("history")
|
||||
onClicked: historyTab.checkIfHistoryIsBeingFetched()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user