2020-06-17 15:18:31 -04:00
|
|
|
import QtQuick 2.13
|
2020-06-23 14:51:10 -04:00
|
|
|
import QtQuick.Controls 2.13
|
2020-06-17 15:18:31 -04:00
|
|
|
import QtQuick.Layouts 1.13
|
2021-09-28 18:04:06 +03:00
|
|
|
|
2021-06-11 15:57:43 +02:00
|
|
|
import StatusQ.Layout 0.1
|
|
|
|
|
2021-10-05 22:50:22 +02:00
|
|
|
import utils 1.0
|
2021-10-28 00:27:49 +03:00
|
|
|
import shared.controls 1.0
|
2021-10-14 15:39:12 +02:00
|
|
|
|
2021-10-05 22:50:22 +02:00
|
|
|
import "popups"
|
|
|
|
import "panels"
|
|
|
|
import "views"
|
|
|
|
import "stores"
|
2023-05-11 12:29:19 +02:00
|
|
|
import "controls"
|
2021-10-05 22:50:22 +02:00
|
|
|
|
2021-06-11 15:57:43 +02:00
|
|
|
Item {
|
2022-08-09 18:08:39 +03:00
|
|
|
id: root
|
2021-06-11 15:57:43 +02:00
|
|
|
|
2020-11-27 12:21:15 -04:00
|
|
|
property bool hideSignPhraseModal: false
|
2022-01-31 14:29:27 +01:00
|
|
|
property var store
|
2022-03-01 11:14:13 +01:00
|
|
|
property var contactsStore
|
2022-03-10 18:01:17 +01:00
|
|
|
property var emojiPopup: null
|
2022-10-17 12:17:25 +02:00
|
|
|
property var sendModalPopup
|
2023-04-04 13:31:04 +02:00
|
|
|
property var networkConnectionStore
|
2020-11-27 12:21:15 -04:00
|
|
|
|
|
|
|
function showSigningPhrasePopup(){
|
2021-12-06 23:10:54 +02:00
|
|
|
if(!hideSignPhraseModal && !RootStore.hideSignPhraseModal){
|
2020-11-27 12:21:15 -04:00
|
|
|
signPhrasePopup.open();
|
|
|
|
}
|
|
|
|
}
|
2021-04-20 14:52:09 -04:00
|
|
|
|
2021-06-11 15:57:43 +02:00
|
|
|
SignPhraseModal {
|
|
|
|
id: signPhrasePopup
|
2021-10-05 22:50:22 +02:00
|
|
|
onRemindLaterClicked: hideSignPhraseModal = true
|
2022-01-21 15:18:43 +01:00
|
|
|
onAcceptClicked: { RootStore.setHideSignPhraseModal(true); }
|
2021-04-20 14:52:09 -04:00
|
|
|
}
|
2020-11-27 13:32:48 -04:00
|
|
|
|
2021-09-20 14:06:14 +02:00
|
|
|
SeedPhraseBackupWarning {
|
|
|
|
id: seedPhraseWarning
|
|
|
|
width: parent.width
|
|
|
|
anchors.top: parent.top
|
|
|
|
}
|
|
|
|
|
2022-03-01 11:14:13 +01: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 18:08:39 +03:00
|
|
|
contactsStore: root.contactsStore
|
2022-10-17 12:17:25 +02:00
|
|
|
sendModal: root.sendModalPopup
|
2022-03-01 11:14:13 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: walletContainer
|
|
|
|
RightTabView {
|
2022-08-09 18:08:39 +03:00
|
|
|
store: root.store
|
2022-09-05 11:15:47 +02:00
|
|
|
contactsStore: root.contactsStore
|
2022-10-17 12:17:25 +02:00
|
|
|
sendModal: root.sendModalPopup
|
2023-04-04 13:31:04 +02:00
|
|
|
networkConnectionStore: root.networkConnectionStore
|
2023-04-26 17:53:49 +02:00
|
|
|
onLaunchShareAddressModal: Global.openPopup(receiveModalComponent);
|
2022-03-01 11:14:13 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-09 18:08:39 +03:00
|
|
|
StatusSectionLayout {
|
2021-09-20 14:06:14 +02:00
|
|
|
anchors.top: seedPhraseWarning.bottom
|
2022-08-09 18:08:39 +03:00
|
|
|
height: root.height - seedPhraseWarning.height
|
|
|
|
width: root.width
|
2022-09-13 19:17:54 +03:00
|
|
|
backButtonName: RootStore.backButtonName
|
2022-10-26 20:00:20 +04:00
|
|
|
notificationCount: activityCenterStore.unreadNotificationsCount
|
2023-04-28 12:35:18 +02:00
|
|
|
hasUnseenNotifications: activityCenterStore.hasUnseenNotifications
|
2023-02-07 19:53:56 +04:00
|
|
|
|
2022-08-09 18:08:39 +03:00
|
|
|
onNotificationButtonClicked: Global.openActivityCenterPopup()
|
2022-09-13 19:17:54 +03:00
|
|
|
onBackButtonClicked: {
|
|
|
|
rightPanelStackView.currentItem.resetStack();
|
|
|
|
}
|
|
|
|
|
2021-06-11 15:57:43 +02:00
|
|
|
Component.onCompleted: {
|
2021-10-14 10:04:15 +02:00
|
|
|
// Read in RootStore
|
|
|
|
// if(RootStore.firstTimeLogin){
|
|
|
|
// RootStore.firstTimeLogin = false
|
|
|
|
// RootStore.setInitialRange()
|
|
|
|
// }
|
2020-05-27 16:50:39 -04:00
|
|
|
}
|
2020-05-14 12:16:01 -04:00
|
|
|
|
2021-10-05 22:50:22 +02:00
|
|
|
leftPanel: LeftTabView {
|
2020-11-27 13:32:48 -04:00
|
|
|
id: leftTab
|
2021-06-11 15:57:43 +02:00
|
|
|
anchors.fill: parent
|
2023-04-27 15:22:27 +02:00
|
|
|
changeSelectedAccount: function(address) {
|
|
|
|
RootStore.setFilterAddress(address)
|
2023-05-31 09:47:52 +02:00
|
|
|
if (!!rightPanelStackView.currentItem.resetView)
|
|
|
|
rightPanelStackView.currentItem.resetView()
|
2023-05-12 09:11:44 +02:00
|
|
|
}
|
|
|
|
selectAllAccounts: function() {
|
|
|
|
RootStore.setFillterAllAddresses()
|
2023-06-15 15:09:35 +02:00
|
|
|
if (!!rightPanelStackView.currentItem.resetView)
|
|
|
|
rightPanelStackView.currentItem.resetView()
|
2022-03-01 11:14:13 +01:00
|
|
|
}
|
2023-01-05 15:50:55 +03:00
|
|
|
onShowSavedAddressesChanged: {
|
2022-03-01 11:14:13 +01:00
|
|
|
if(showSavedAddresses)
|
|
|
|
rightPanelStackView.replace(cmpSavedAddresses)
|
|
|
|
else
|
|
|
|
rightPanelStackView.replace(walletContainer)
|
2023-04-26 19:31:34 +02:00
|
|
|
RootStore.backButtonName = ""
|
2021-10-05 22:50:22 +02:00
|
|
|
}
|
2022-08-09 18:08:39 +03:00
|
|
|
emojiPopup: root.emojiPopup
|
2023-04-04 13:31:04 +02:00
|
|
|
networkConnectionStore: root.networkConnectionStore
|
2020-11-27 13:32:48 -04:00
|
|
|
}
|
2021-06-11 15:57:43 +02:00
|
|
|
|
2022-08-09 18:08:39 +03:00
|
|
|
centerPanel: StackView {
|
2022-03-01 11:14:13 +01:00
|
|
|
id: rightPanelStackView
|
2021-10-05 22:50:22 +02:00
|
|
|
anchors.fill: parent
|
2022-09-13 19:17:54 +03:00
|
|
|
anchors.leftMargin: 64
|
|
|
|
anchors.rightMargin: 64
|
2022-03-01 11:14:13 +01: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 16:50:39 -04:00
|
|
|
}
|
2023-05-11 12:29:19 +02:00
|
|
|
headerBackground: AccountHeaderGradient {
|
|
|
|
width: parent.width
|
|
|
|
overview: RootStore.overview
|
|
|
|
}
|
2023-04-26 19:31:34 +02:00
|
|
|
|
|
|
|
footer: WalletFooter {
|
|
|
|
sendModal: root.sendModalPopup
|
|
|
|
width: parent.width
|
|
|
|
walletStore: RootStore
|
|
|
|
networkConnectionStore: root.networkConnectionStore
|
2023-04-26 17:53:49 +02:00
|
|
|
onLaunchShareAddressModal: Global.openPopup(receiveModalComponent)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: receiveModalComponent
|
|
|
|
ReceiveModal {
|
|
|
|
anchors.centerIn: parent
|
2023-04-26 19:31:34 +02:00
|
|
|
}
|
2020-05-14 12:16:01 -04:00
|
|
|
}
|
2023-05-17 08:39:06 +02:00
|
|
|
|
|
|
|
Connections {
|
|
|
|
target: RootStore.walletSectionInst
|
|
|
|
function onShowToastAccountAdded(name: string) {
|
|
|
|
Global.displayToastMessage(
|
|
|
|
qsTr("\"%1\" successfuly added").arg(name),
|
|
|
|
"",
|
|
|
|
"check-circle",
|
|
|
|
false,
|
|
|
|
Constants.ephemeralNotificationType.success,
|
|
|
|
""
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
2020-05-14 12:16:01 -04:00
|
|
|
}
|