2022-02-11 09:44:49 +00:00
|
|
|
import QtQuick 2.13
|
2023-04-17 11:36:40 +00:00
|
|
|
import SortFilterProxyModel 0.2
|
2022-02-11 09:44:49 +00:00
|
|
|
|
2022-03-01 10:08:15 +00:00
|
|
|
import utils 1.0
|
2022-02-11 09:44:49 +00:00
|
|
|
import shared.status 1.0
|
2022-03-01 10:08:15 +00:00
|
|
|
import shared.panels 1.0
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Core 0.1
|
2023-08-04 12:41:57 +00:00
|
|
|
import StatusQ.Controls 0.1
|
2022-03-15 14:59:58 +00:00
|
|
|
import StatusQ.Components 0.1
|
2023-07-28 13:12:46 +00:00
|
|
|
|
|
|
|
import shared.popups 1.0
|
2023-06-27 07:13:55 +00:00
|
|
|
import shared.popups.addaccount 1.0
|
2022-02-11 09:44:49 +00:00
|
|
|
|
|
|
|
import "../../stores"
|
2022-03-01 14:40:53 +00:00
|
|
|
import "../../controls"
|
2022-03-02 14:24:39 +00:00
|
|
|
import "../../popups"
|
2022-02-11 09:44:49 +00:00
|
|
|
|
|
|
|
Column {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property WalletStore walletStore
|
2023-06-27 07:13:55 +00:00
|
|
|
property var emojiPopup
|
2022-02-11 09:44:49 +00:00
|
|
|
|
|
|
|
signal goToNetworksView()
|
2023-06-20 11:59:15 +00:00
|
|
|
signal goToAccountOrderView()
|
2023-07-18 09:10:48 +00:00
|
|
|
signal goToAccountView(var account, var keypair)
|
2022-03-04 09:09:58 +00:00
|
|
|
signal goToDappPermissionsView()
|
2023-07-28 07:57:58 +00:00
|
|
|
signal runRenameKeypairFlow(var model)
|
|
|
|
signal runRemoveKeypairFlow(var model)
|
2022-03-01 10:08:15 +00:00
|
|
|
|
2023-06-27 07:13:55 +00:00
|
|
|
spacing: 8
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
target: walletSection
|
|
|
|
|
|
|
|
function onDisplayAddAccountPopup() {
|
|
|
|
addAccount.active = true
|
|
|
|
}
|
|
|
|
function onDestroyAddAccountPopup() {
|
|
|
|
addAccount.active = false
|
|
|
|
}
|
2023-03-10 20:36:27 +00:00
|
|
|
}
|
|
|
|
|
2023-08-04 12:41:57 +00:00
|
|
|
component Spacer: Item {
|
|
|
|
height: 8
|
|
|
|
}
|
|
|
|
|
2023-06-22 10:32:43 +00:00
|
|
|
|
2023-06-27 07:13:55 +00:00
|
|
|
Loader {
|
|
|
|
id: addAccount
|
|
|
|
active: false
|
|
|
|
asynchronous: true
|
2022-03-01 10:08:15 +00:00
|
|
|
|
2023-06-27 07:13:55 +00:00
|
|
|
sourceComponent: AddAccountPopup {
|
|
|
|
store.emojiPopup: root.emojiPopup
|
|
|
|
store.addAccountModule: walletSection.addAccountModule
|
|
|
|
}
|
|
|
|
|
|
|
|
onLoaded: {
|
|
|
|
addAccount.item.open()
|
|
|
|
}
|
2022-03-01 10:08:15 +00:00
|
|
|
}
|
|
|
|
|
2023-06-22 10:32:43 +00:00
|
|
|
Separator {}
|
2022-03-01 10:08:15 +00:00
|
|
|
|
2022-03-15 14:59:58 +00:00
|
|
|
StatusListItem {
|
2022-07-21 12:15:02 +00:00
|
|
|
objectName: "networksItem"
|
2022-03-15 14:59:58 +00:00
|
|
|
title: qsTr("Networks")
|
2022-03-01 10:08:15 +00:00
|
|
|
height: 64
|
2022-03-15 14:59:58 +00:00
|
|
|
width: parent.width
|
2022-02-11 09:44:49 +00:00
|
|
|
onClicked: goToNetworksView()
|
2022-03-15 14:59:58 +00:00
|
|
|
components: [
|
|
|
|
StatusIcon {
|
2023-04-25 10:32:57 +00:00
|
|
|
icon: "next"
|
2022-03-15 14:59:58 +00:00
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
}
|
|
|
|
]
|
2022-02-11 09:44:49 +00:00
|
|
|
}
|
2022-03-01 10:08:15 +00:00
|
|
|
|
2023-06-22 10:32:43 +00:00
|
|
|
Separator {}
|
2022-03-01 10:08:15 +00:00
|
|
|
|
2023-06-20 11:59:15 +00:00
|
|
|
StatusListItem {
|
|
|
|
objectName: "accountOrderItem"
|
|
|
|
title: qsTr("Account order")
|
|
|
|
height: 64
|
|
|
|
width: parent.width
|
|
|
|
onClicked: goToAccountOrderView()
|
|
|
|
components: [
|
|
|
|
StatusIcon {
|
|
|
|
icon: "next"
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
Separator {}
|
|
|
|
|
2023-08-04 12:41:57 +00:00
|
|
|
Spacer {
|
|
|
|
visible: root.walletStore.walletModule.hasPairedDevices
|
|
|
|
width: parent.width
|
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
visible: root.walletStore.walletModule.hasPairedDevices
|
|
|
|
height: 102
|
|
|
|
width: parent.width
|
|
|
|
color: Theme.palette.transparent
|
|
|
|
radius: 8
|
|
|
|
border.width: 1
|
|
|
|
border.color: Theme.palette.baseColor5
|
|
|
|
|
|
|
|
Column {
|
|
|
|
anchors.fill: parent
|
|
|
|
padding: 16
|
|
|
|
spacing: 8
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
text: qsTr("Import keypairs from this device to your other synced devices")
|
|
|
|
font.pixelSize: 15
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: qsTr("Show encrypted QR of keypairs on device")
|
|
|
|
icon.name: "qr"
|
|
|
|
onClicked: {
|
|
|
|
console.warn("TODO: run generate qr code flow...")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Spacer {
|
2023-04-25 10:32:57 +00:00
|
|
|
width: parent.width
|
2022-03-01 14:40:53 +00:00
|
|
|
}
|
|
|
|
|
2023-06-22 10:32:43 +00:00
|
|
|
Column {
|
2023-04-25 10:32:57 +00:00
|
|
|
width: parent.width
|
2023-06-22 10:32:43 +00:00
|
|
|
spacing: 24
|
|
|
|
Repeater {
|
|
|
|
objectName: "generatedAccounts"
|
|
|
|
model: walletStore.originModel
|
|
|
|
delegate: WalletKeyPairDelegate {
|
|
|
|
width: parent.width
|
2023-07-18 09:10:48 +00:00
|
|
|
keyPair: model.keyPair
|
2023-07-21 08:41:24 +00:00
|
|
|
getNetworkShortNames: walletStore.getNetworkShortNames
|
2023-06-22 10:32:43 +00:00
|
|
|
userProfilePublicKey: walletStore.userProfilePublicKey
|
2023-06-26 15:57:16 +00:00
|
|
|
includeWatchOnlyAccount: walletStore.includeWatchOnlyAccount
|
2023-07-18 09:10:48 +00:00
|
|
|
onGoToAccountView: root.goToAccountView(account, keyPair)
|
2023-06-26 15:57:16 +00:00
|
|
|
onToggleIncludeWatchOnlyAccount: walletStore.toggleIncludeWatchOnlyAccount()
|
2023-07-28 07:57:58 +00:00
|
|
|
onRunRenameKeypairFlow: root.runRenameKeypairFlow(model)
|
|
|
|
onRunRemoveKeypairFlow: root.runRemoveKeypairFlow(model)
|
2023-08-04 12:41:57 +00:00
|
|
|
onRunImportViaSeedPhraseFlow: {
|
|
|
|
root.walletStore.runKeypairImportPopup(model.keyPair.keyUid, Constants.keypairImportPopup.importOption.seedPhrase)
|
|
|
|
}
|
|
|
|
onRunImportViaPrivateKeyFlow: {
|
|
|
|
root.walletStore.runKeypairImportPopup(model.keyPair.keyUid, Constants.keypairImportPopup.importOption.privateKey)
|
|
|
|
}
|
2022-03-07 09:33:38 +00:00
|
|
|
}
|
2022-03-01 14:40:53 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-15 14:59:58 +00:00
|
|
|
}
|