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
|
2021-09-28 15:04:06 +00:00
|
|
|
|
2021-06-11 13:57:43 +00:00
|
|
|
import StatusQ.Layout 0.1
|
|
|
|
|
2021-10-05 20:50:22 +00:00
|
|
|
import utils 1.0
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared.controls 1.0
|
2021-10-14 13:39:12 +00:00
|
|
|
|
2021-10-05 20:50:22 +00:00
|
|
|
import "popups"
|
|
|
|
import "panels"
|
|
|
|
import "views"
|
|
|
|
import "stores"
|
|
|
|
|
2021-06-11 13:57:43 +00:00
|
|
|
Item {
|
2022-08-09 15:08:39 +00:00
|
|
|
id: root
|
2021-06-11 13:57:43 +00:00
|
|
|
|
2020-11-27 16:21:15 +00:00
|
|
|
property bool hideSignPhraseModal: false
|
2022-01-31 13:29:27 +00:00
|
|
|
property var store
|
2022-03-01 10:14:13 +00:00
|
|
|
property var contactsStore
|
2022-03-10 17:01:17 +00:00
|
|
|
property var emojiPopup: null
|
2022-03-23 11:08:49 +00:00
|
|
|
property var sendModal
|
2020-11-27 16:21:15 +00:00
|
|
|
|
|
|
|
function showSigningPhrasePopup(){
|
2021-12-06 21:10:54 +00:00
|
|
|
if(!hideSignPhraseModal && !RootStore.hideSignPhraseModal){
|
2020-11-27 16:21:15 +00:00
|
|
|
signPhrasePopup.open();
|
|
|
|
}
|
|
|
|
}
|
2021-04-20 18:52:09 +00:00
|
|
|
|
2021-06-11 13:57:43 +00:00
|
|
|
SignPhraseModal {
|
|
|
|
id: signPhrasePopup
|
2021-10-05 20:50:22 +00:00
|
|
|
onRemindLaterClicked: hideSignPhraseModal = true
|
2022-01-21 14:18:43 +00:00
|
|
|
onAcceptClicked: { RootStore.setHideSignPhraseModal(true); }
|
2021-04-20 18:52:09 +00:00
|
|
|
}
|
2020-11-27 17:32:48 +00:00
|
|
|
|
2021-09-20 12:06:14 +00:00
|
|
|
SeedPhraseBackupWarning {
|
|
|
|
id: seedPhraseWarning
|
|
|
|
width: parent.width
|
|
|
|
anchors.top: parent.top
|
|
|
|
}
|
|
|
|
|
2022-03-01 10:14:13 +00:00
|
|
|
Component {
|
|
|
|
id: cmpSavedAddresses
|
|
|
|
SavedAddressesView {
|
|
|
|
anchors.top: parent ? parent.top: undefined
|
|
|
|
anchors.left: parent ? parent.left: undefined
|
|
|
|
anchors.right: parent ? parent.right: undefined
|
2022-08-09 15:08:39 +00:00
|
|
|
contactsStore: root.contactsStore
|
|
|
|
sendModal: root.sendModal
|
2022-03-01 10:14:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: walletContainer
|
|
|
|
RightTabView {
|
2022-08-09 15:08:39 +00:00
|
|
|
store: root.store
|
2022-09-05 09:15:47 +00:00
|
|
|
contactsStore: root.contactsStore
|
2022-08-09 15:08:39 +00:00
|
|
|
sendModal: root.sendModal
|
2022-03-01 10:14:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-20 12:06:14 +00:00
|
|
|
|
2022-08-09 15:08:39 +00:00
|
|
|
StatusSectionLayout {
|
2021-09-20 12:06:14 +00:00
|
|
|
anchors.top: seedPhraseWarning.bottom
|
2022-08-09 15:08:39 +00:00
|
|
|
height: root.height - seedPhraseWarning.height
|
|
|
|
width: root.width
|
2022-09-13 16:17:54 +00:00
|
|
|
backButtonName: RootStore.backButtonName
|
2022-08-09 15:08:39 +00:00
|
|
|
notificationCount: RootStore.unreadNotificationsCount
|
|
|
|
onNotificationButtonClicked: Global.openActivityCenterPopup()
|
2022-09-13 16:17:54 +00:00
|
|
|
onBackButtonClicked: {
|
|
|
|
rightPanelStackView.currentItem.resetStack();
|
|
|
|
}
|
|
|
|
|
2021-06-11 13:57:43 +00:00
|
|
|
Component.onCompleted: {
|
2021-10-14 08:04:15 +00:00
|
|
|
// Read in RootStore
|
|
|
|
// if(RootStore.firstTimeLogin){
|
|
|
|
// RootStore.firstTimeLogin = false
|
|
|
|
// RootStore.setInitialRange()
|
|
|
|
// }
|
2020-05-27 20:50:39 +00:00
|
|
|
}
|
2020-05-14 16:16:01 +00:00
|
|
|
|
2021-06-11 13:57:43 +00:00
|
|
|
Timer {
|
|
|
|
id: recentHistoryTimer
|
|
|
|
interval: Constants.walletFetchRecentHistoryInterval
|
|
|
|
running: true
|
|
|
|
repeat: true
|
2021-10-05 20:50:22 +00:00
|
|
|
onTriggered: RootStore.checkRecentHistory()
|
2021-06-11 13:57:43 +00:00
|
|
|
}
|
2022-02-09 09:43:23 +00:00
|
|
|
|
2021-10-05 20:50:22 +00:00
|
|
|
leftPanel: LeftTabView {
|
2020-11-27 17:32:48 +00:00
|
|
|
id: leftTab
|
2021-06-11 13:57:43 +00:00
|
|
|
anchors.fill: parent
|
2021-10-05 20:50:22 +00:00
|
|
|
changeSelectedAccount: function(newIndex) {
|
|
|
|
if (newIndex > RootStore.accounts) {
|
|
|
|
return
|
|
|
|
}
|
2021-10-21 08:22:05 +00:00
|
|
|
RootStore.switchAccount(newIndex)
|
2022-03-01 10:14:13 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
showSavedAddresses: function(showSavedAddresses) {
|
|
|
|
if(showSavedAddresses)
|
|
|
|
rightPanelStackView.replace(cmpSavedAddresses)
|
|
|
|
else
|
|
|
|
rightPanelStackView.replace(walletContainer)
|
2021-10-05 20:50:22 +00:00
|
|
|
}
|
2022-08-09 15:08:39 +00:00
|
|
|
emojiPopup: root.emojiPopup
|
2020-11-27 17:32:48 +00:00
|
|
|
}
|
2021-06-11 13:57:43 +00:00
|
|
|
|
2022-08-09 15:08:39 +00:00
|
|
|
centerPanel: StackView {
|
2022-03-01 10:14:13 +00:00
|
|
|
id: rightPanelStackView
|
2021-10-05 20:50:22 +00:00
|
|
|
anchors.fill: parent
|
2022-09-13 16:17:54 +00:00
|
|
|
anchors.leftMargin: 64
|
|
|
|
anchors.rightMargin: 64
|
2022-03-01 10:14:13 +00:00
|
|
|
initialItem: walletContainer
|
|
|
|
replaceEnter: Transition {
|
|
|
|
NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 400; easing.type: Easing.OutCubic }
|
|
|
|
}
|
|
|
|
replaceExit: Transition {
|
|
|
|
NumberAnimation { property: "opacity"; from: 1; to: 0; duration: 400; easing.type: Easing.OutCubic }
|
|
|
|
}
|
2020-05-27 20:50:39 +00:00
|
|
|
}
|
2020-05-14 16:16:01 +00:00
|
|
|
}
|
|
|
|
}
|