2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
2020-06-23 18:51:10 +00:00
|
|
|
import QtQuick.Controls 2.13
|
2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick.Layouts 1.13
|
2020-05-14 16:16:01 +00:00
|
|
|
import "../../../imports"
|
|
|
|
import "../../../shared"
|
|
|
|
import "."
|
|
|
|
|
2020-05-27 15:41:40 +00:00
|
|
|
SplitView {
|
2020-05-14 16:16:01 +00:00
|
|
|
id: walletView
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
2020-06-23 18:51:10 +00:00
|
|
|
handle: SplitViewHandle {}
|
2020-06-11 20:25:44 +00:00
|
|
|
|
2020-09-15 19:47:13 +00:00
|
|
|
Connections {
|
2020-09-16 14:28:03 +00:00
|
|
|
target: applicationWindow
|
2020-09-15 19:47:13 +00:00
|
|
|
onSettingsLoaded: {
|
|
|
|
// Add recent
|
|
|
|
walletView.restoreState(appSettings.walletSplitView)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Component.onDestruction: appSettings.walletSplitView = this.saveState()
|
2020-06-23 20:49:04 +00:00
|
|
|
|
2020-05-14 16:16:01 +00:00
|
|
|
LeftTab {
|
|
|
|
id: leftTab
|
2020-07-02 15:14:31 +00:00
|
|
|
SplitView.preferredWidth: Style.current.leftTabPrefferedSize
|
|
|
|
SplitView.minimumWidth: Style.current.leftTabMinimumWidth
|
|
|
|
SplitView.maximumWidth: Style.current.leftTabMaximumWidth
|
2020-05-14 16:16:01 +00:00
|
|
|
}
|
|
|
|
|
2020-11-27 16:21:15 +00:00
|
|
|
property bool hideSignPhraseModal: false
|
|
|
|
|
|
|
|
SignPhraseModal {
|
|
|
|
id: signPhrasePopup
|
|
|
|
}
|
|
|
|
|
|
|
|
function showSigningPhrasePopup(){
|
|
|
|
if(!hideSignPhraseModal && !appSettings.hideSignPhraseModal){
|
|
|
|
signPhrasePopup.open();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-27 15:41:40 +00:00
|
|
|
Item {
|
2020-05-14 16:16:01 +00:00
|
|
|
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
|
|
|
|
|
2020-05-28 13:49:28 +00:00
|
|
|
WalletHeader {
|
2020-05-27 20:50:39 +00:00
|
|
|
id: walletHeader
|
2020-06-10 20:21:23 +00:00
|
|
|
changeSelectedAccount: leftTab.changeSelectedAccount
|
2020-05-27 20:50:39 +00:00
|
|
|
}
|
2020-05-14 16:16:01 +00:00
|
|
|
|
2020-05-27 20:50:39 +00:00
|
|
|
RowLayout {
|
2020-05-28 14:54:42 +00:00
|
|
|
id: walletInfoContainer
|
2020-05-27 20:50:39 +00:00
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: 0
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 0
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 0
|
|
|
|
anchors.top: walletHeader.bottom
|
|
|
|
anchors.topMargin: 23
|
2020-05-14 16:16:01 +00:00
|
|
|
|
2020-05-28 14:32:58 +00:00
|
|
|
Item {
|
2020-05-28 14:54:42 +00:00
|
|
|
id: walletInfoContent
|
2020-05-28 14:32:58 +00:00
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
2020-05-27 20:50:39 +00:00
|
|
|
|
2020-05-28 14:32:58 +00:00
|
|
|
TabBar {
|
|
|
|
id: walletTabBar
|
2020-05-27 20:50:39 +00:00
|
|
|
anchors.right: parent.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.rightMargin: Style.current.bigPadding
|
2020-05-27 20:50:39 +00:00
|
|
|
anchors.left: parent.left
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.bigPadding
|
2020-05-28 14:32:58 +00:00
|
|
|
anchors.top: parent.top
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-05-28 14:54:42 +00:00
|
|
|
height: assetBtn.height
|
2020-07-13 18:45:54 +00:00
|
|
|
background: Rectangle {
|
|
|
|
color: Style.current.transparent
|
|
|
|
}
|
2020-05-27 20:50:39 +00:00
|
|
|
|
2020-05-28 14:32:58 +00:00
|
|
|
StatusTabButton {
|
|
|
|
id: assetBtn
|
2020-11-27 15:13:35 +00:00
|
|
|
tabColor: walletModel.currentAccount.iconColor
|
2020-07-16 15:20:29 +00:00
|
|
|
//% "Assets"
|
|
|
|
btnText: qsTrId("wallet-assets")
|
2020-05-27 15:41:40 +00:00
|
|
|
}
|
2020-05-28 14:32:58 +00:00
|
|
|
StatusTabButton {
|
|
|
|
id: collectiblesBtn
|
2020-11-27 15:13:35 +00:00
|
|
|
tabColor: walletModel.currentAccount.iconColor
|
2020-05-28 14:32:58 +00:00
|
|
|
anchors.left: assetBtn.right
|
|
|
|
anchors.leftMargin: 32
|
2020-07-16 15:20:29 +00:00
|
|
|
//% "Collectibles"
|
|
|
|
btnText: qsTrId("wallet-collectibles")
|
2020-05-27 15:41:40 +00:00
|
|
|
}
|
2020-05-28 14:32:58 +00:00
|
|
|
StatusTabButton {
|
|
|
|
id: historyBtn
|
2020-11-27 15:13:35 +00:00
|
|
|
tabColor: walletModel.currentAccount.iconColor
|
2020-05-28 14:32:58 +00:00
|
|
|
anchors.left: collectiblesBtn.right
|
|
|
|
anchors.leftMargin: 32
|
2020-07-16 15:20:29 +00:00
|
|
|
//% "History"
|
|
|
|
btnText: qsTrId("history")
|
2020-09-04 15:37:38 +00:00
|
|
|
onClicked: historyTab.checkIfHistoryIsBeingFetched()
|
2020-05-27 20:50:39 +00:00
|
|
|
}
|
2020-05-28 14:32:58 +00:00
|
|
|
}
|
|
|
|
|
2020-05-28 14:54:42 +00:00
|
|
|
StackLayout {
|
|
|
|
id: stackLayout
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.rightMargin: Style.current.bigPadding
|
|
|
|
anchors.leftMargin: Style.current.bigPadding
|
2020-05-28 14:54:42 +00:00
|
|
|
anchors.top: walletTabBar.bottom
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.left: parent.left
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.bigPadding
|
2020-05-28 14:54:42 +00:00
|
|
|
currentIndex: walletTabBar.currentIndex
|
2020-05-28 14:32:58 +00:00
|
|
|
|
2020-05-28 14:54:42 +00:00
|
|
|
AssetsTab {
|
|
|
|
id: assetsTab
|
|
|
|
}
|
|
|
|
CollectiblesTab {
|
|
|
|
id: collectiblesTab
|
|
|
|
}
|
|
|
|
HistoryTab {
|
|
|
|
id: historyTab
|
2020-05-27 15:41:40 +00:00
|
|
|
}
|
2020-05-28 14:32:58 +00:00
|
|
|
}
|
2020-05-27 20:50:39 +00:00
|
|
|
}
|
|
|
|
}
|
2020-05-14 16:16:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
2020-05-28 14:32:58 +00:00
|
|
|
D{i:0;autoSize:true;formeditorColor:"#ffffff";height:770;width:1152}
|
2020-05-14 16:16:01 +00:00
|
|
|
}
|
|
|
|
##^##*/
|