refactor(WalletLayout): use StatusQ two panel layout
This commit is contained in:
parent
8d48ebf864
commit
88ca3b9bbf
|
@ -11,7 +11,6 @@ Rectangle {
|
||||||
id: root
|
id: root
|
||||||
visible: !profileModel.mnemonic.isBackedUp
|
visible: !profileModel.mnemonic.isBackedUp
|
||||||
height: visible ? 32 : 0
|
height: visible ? 32 : 0
|
||||||
Layout.fillWidth: true
|
|
||||||
color: Style.current.red
|
color: Style.current.red
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
|
|
@ -5,12 +5,12 @@ import "../../../imports"
|
||||||
import "../../../shared"
|
import "../../../shared"
|
||||||
import "."
|
import "."
|
||||||
|
|
||||||
ColumnLayout {
|
import StatusQ.Layout 0.1
|
||||||
property bool hideSignPhraseModal: false
|
|
||||||
|
|
||||||
SignPhraseModal {
|
Item {
|
||||||
id: signPhrasePopup
|
id: walletView
|
||||||
}
|
|
||||||
|
property bool hideSignPhraseModal: false
|
||||||
|
|
||||||
function showSigningPhrasePopup(){
|
function showSigningPhrasePopup(){
|
||||||
if(!hideSignPhraseModal && !appSettings.hideSignPhraseModal){
|
if(!hideSignPhraseModal && !appSettings.hideSignPhraseModal){
|
||||||
|
@ -18,55 +18,46 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
SignPhraseModal {
|
||||||
if(onboardingModel.firstTimeLogin){
|
id: signPhrasePopup
|
||||||
onboardingModel.firstTimeLogin = false
|
|
||||||
walletModel.setInitialRange()
|
|
||||||
}
|
|
||||||
walletModel.transactionsView.checkRecentHistory()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
SeedPhraseBackupWarning {
|
||||||
id: recentHistoryTimer
|
id: seedPhraseWarning
|
||||||
interval: Constants.walletFetchRecentHistoryInterval
|
width: parent.width
|
||||||
running: true
|
anchors.top: parent.top
|
||||||
repeat: true
|
|
||||||
onTriggered: walletModel.transactionsView.checkRecentHistory()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SeedPhraseBackupWarning { }
|
StatusAppTwoPanelLayout {
|
||||||
|
anchors.top: seedPhraseWarning.bottom
|
||||||
|
height: walletView.height - seedPhraseWarning.height
|
||||||
|
width: walletView.width
|
||||||
|
|
||||||
SplitView {
|
Component.onCompleted: {
|
||||||
id: walletView
|
if(onboardingModel.firstTimeLogin){
|
||||||
Layout.fillHeight: true
|
onboardingModel.firstTimeLogin = false
|
||||||
Layout.fillWidth: true
|
walletModel.setInitialRange()
|
||||||
|
|
||||||
handle: SplitViewHandle {}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: appMain
|
|
||||||
onSettingsLoaded: {
|
|
||||||
// Add recent
|
|
||||||
walletView.restoreState(appSettings.walletSplitView)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component.onDestruction: appSettings.walletSplitView = this.saveState()
|
|
||||||
|
|
||||||
LeftTab {
|
Timer {
|
||||||
id: leftTab
|
id: recentHistoryTimer
|
||||||
SplitView.preferredWidth: Style.current.leftTabPreferredSize
|
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
|
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 {
|
WalletHeader {
|
||||||
id: walletHeader
|
id: walletHeader
|
||||||
|
@ -101,7 +92,6 @@ ColumnLayout {
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: Style.current.transparent
|
color: Style.current.transparent
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusTabButton {
|
StatusTabButton {
|
||||||
id: assetBtn
|
id: assetBtn
|
||||||
//% "Assets"
|
//% "Assets"
|
||||||
|
@ -120,6 +110,7 @@ ColumnLayout {
|
||||||
anchors.leftMargin: 32
|
anchors.leftMargin: 32
|
||||||
//% "History"
|
//% "History"
|
||||||
btnText: qsTrId("history")
|
btnText: qsTrId("history")
|
||||||
|
onClicked: historyTab.checkIfHistoryIsBeingFetched()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue