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
|
2022-03-15 14:59:58 +00:00
|
|
|
import StatusQ.Components 0.1
|
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
|
|
|
|
|
|
|
|
signal goToNetworksView()
|
2023-04-17 11:36:40 +00:00
|
|
|
signal goToAccountView(var account)
|
2022-03-04 09:09:58 +00:00
|
|
|
signal goToDappPermissionsView()
|
2022-03-01 10:08:15 +00:00
|
|
|
|
2023-03-10 20:36:27 +00:00
|
|
|
Component.onCompleted: {
|
|
|
|
// TODO remove this call and handle it from the backend
|
|
|
|
// once the profile is refactored and the navigation is driven from the backend
|
|
|
|
root.walletStore.loadDapps()
|
|
|
|
}
|
|
|
|
|
2023-06-22 10:32:43 +00:00
|
|
|
spacing: 8
|
|
|
|
|
|
|
|
Separator {}
|
2022-03-01 10:08:15 +00:00
|
|
|
|
2022-03-15 14:59:58 +00:00
|
|
|
StatusListItem {
|
|
|
|
title: qsTr("DApp Permissions")
|
2022-03-01 10:08:15 +00:00
|
|
|
height: 64
|
2022-03-15 14:59:58 +00:00
|
|
|
width: parent.width
|
2022-03-04 09:09:58 +00:00
|
|
|
onClicked: goToDappPermissionsView()
|
2022-08-07 20:20:11 +00:00
|
|
|
label: qsTr("%n DApp(s) connected", "", root.walletStore.dappList.count)
|
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-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-22 10:32:43 +00:00
|
|
|
Item {
|
2023-04-25 10:32:57 +00:00
|
|
|
width: parent.width
|
2023-06-22 10:32:43 +00:00
|
|
|
height: 8
|
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
|
|
|
|
chainShortNames: walletStore.getAllNetworksSupportedPrefix()
|
|
|
|
userProfilePublicKey: walletStore.userProfilePublicKey
|
|
|
|
onGoToAccountView: root.goToAccountView(account)
|
2022-03-07 09:33:38 +00:00
|
|
|
}
|
2022-03-01 14:40:53 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-15 14:59:58 +00:00
|
|
|
}
|