2022-02-11 09:44:49 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
|
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-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()
|
2022-03-07 09:33:38 +00:00
|
|
|
signal goToAccountView(address: string)
|
2022-03-04 09:09:58 +00:00
|
|
|
signal goToDappPermissionsView()
|
2022-03-01 10:08:15 +00:00
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
id: titleText
|
|
|
|
text: qsTr("Wallet")
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: 28
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
height: Style.current.bigPadding
|
|
|
|
width: parent.width
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusSettingsLineButton {
|
|
|
|
text: qsTr("Manage Assets & List")
|
|
|
|
height: 64
|
2022-03-02 14:24:39 +00:00
|
|
|
onClicked: Global.openPopup(tokenSettingsModalComponent)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: tokenSettingsModalComponent
|
|
|
|
TokenSettingsModal {
|
|
|
|
walletStore: root.walletStore
|
|
|
|
onClosed: {
|
|
|
|
destroy();
|
|
|
|
}
|
|
|
|
}
|
2022-03-01 10:08:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Separator {
|
|
|
|
height: 17
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: -Style.current.padding
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: -Style.current.padding
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusSettingsLineButton {
|
2022-03-04 09:09:58 +00:00
|
|
|
text: qsTr("DApp Permissions")
|
|
|
|
currentValue: {
|
|
|
|
return qsTr("%1 DApps connected").arg(root.walletStore.dappList.count)
|
|
|
|
}
|
2022-03-01 10:08:15 +00:00
|
|
|
height: 64
|
2022-03-04 09:09:58 +00:00
|
|
|
onClicked: goToDappPermissionsView()
|
2022-03-01 10:08:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Separator {
|
|
|
|
height: 17
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: -Style.current.padding
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: -Style.current.padding
|
|
|
|
}
|
|
|
|
|
2022-02-11 09:44:49 +00:00
|
|
|
StatusSettingsLineButton {
|
|
|
|
text: qsTr("Networks")
|
2022-03-01 10:08:15 +00:00
|
|
|
height: 64
|
2022-03-09 14:24:46 +00:00
|
|
|
visible: root.walletStore.isMultiNetworkEnabled
|
2022-02-11 09:44:49 +00:00
|
|
|
onClicked: goToNetworksView()
|
|
|
|
}
|
2022-03-01 10:08:15 +00:00
|
|
|
|
|
|
|
Separator {
|
|
|
|
height: 17
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: -Style.current.padding
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: -Style.current.padding
|
2022-03-09 14:24:46 +00:00
|
|
|
visible: root.walletStore.isMultiNetworkEnabled
|
2022-03-01 10:08:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
height: Style.current.bigPadding
|
|
|
|
width: parent.width
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
id: accountsText
|
|
|
|
text: qsTr("Accounts")
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusSectionHeadline {
|
|
|
|
text: qsTr("Generated from Your Seed Phrase")
|
|
|
|
topPadding: Style.current.bigPadding
|
|
|
|
bottomPadding: Style.current.padding
|
|
|
|
}
|
|
|
|
|
2022-03-01 14:40:53 +00:00
|
|
|
Repeater {
|
|
|
|
model: walletStore.generatedAccounts
|
|
|
|
delegate: WalletAccountDelegate {
|
|
|
|
account: model
|
2022-03-07 09:33:38 +00:00
|
|
|
onGoToAccountView: {
|
|
|
|
root.goToAccountView(model.address)
|
|
|
|
}
|
2022-03-01 14:40:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-01 10:08:15 +00:00
|
|
|
StatusSectionHeadline {
|
|
|
|
text: qsTr("Imported")
|
|
|
|
topPadding: Style.current.bigPadding
|
|
|
|
bottomPadding: Style.current.padding
|
|
|
|
}
|
|
|
|
|
2022-03-01 14:40:53 +00:00
|
|
|
Repeater {
|
|
|
|
model: walletStore.importedAccounts
|
|
|
|
delegate: WalletAccountDelegate {
|
|
|
|
account: model
|
2022-03-07 09:33:38 +00:00
|
|
|
onGoToAccountView: {
|
|
|
|
root.goToAccountView(model.address)
|
|
|
|
}
|
2022-03-01 14:40:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-01 10:08:15 +00:00
|
|
|
StatusSectionHeadline {
|
|
|
|
text: qsTr("Watch-Only")
|
|
|
|
topPadding: Style.current.bigPadding
|
|
|
|
bottomPadding: Style.current.padding
|
|
|
|
}
|
2022-03-01 14:40:53 +00:00
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: walletStore.watchOnlyAccounts
|
|
|
|
delegate: WalletAccountDelegate {
|
|
|
|
account: model
|
2022-03-07 09:33:38 +00:00
|
|
|
onGoToAccountView: {
|
|
|
|
root.goToAccountView(model.address)
|
|
|
|
}
|
2022-03-01 14:40:53 +00:00
|
|
|
}
|
|
|
|
}
|
2022-02-11 09:44:49 +00:00
|
|
|
}
|