status-desktop/ui/app/AppLayouts/Profile/views/wallet/MainView.qml

162 lines
3.6 KiB
QML
Raw Normal View History

import QtQuick 2.13
import utils 1.0
import shared.status 1.0
import shared.panels 1.0
import StatusQ.Core.Theme 0.1
import StatusQ.Core 0.1
import StatusQ.Components 0.1
import "../../stores"
2022-03-01 14:40:53 +00:00
import "../../controls"
import "../../popups"
Column {
id: root
property WalletStore walletStore
signal goToNetworksView()
signal goToAccountView(address: string)
signal goToDappPermissionsView()
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
}
StatusListItem {
title: qsTr("Manage Assets & List")
height: 64
width: parent.width
onClicked: Global.openPopup(tokenSettingsModalComponent)
components: [
StatusIcon {
icon: "chevron-down"
rotation: 270
color: Theme.palette.baseColor1
}
]
}
Component {
id: tokenSettingsModalComponent
TokenSettingsModal {
walletStore: root.walletStore
onClosed: {
destroy();
}
}
}
Separator {
height: 17
}
StatusListItem {
title: qsTr("DApp Permissions")
height: 64
width: parent.width
onClicked: goToDappPermissionsView()
components: [
StatusIcon {
icon: "chevron-down"
rotation: 270
color: Theme.palette.baseColor1
}
]
}
Separator {
height: 17
}
StatusListItem {
title: qsTr("Networks")
height: 64
width: parent.width
onClicked: goToNetworksView()
components: [
StatusIcon {
icon: "chevron-down"
rotation: 270
color: Theme.palette.baseColor1
}
]
}
Separator {
height: 17
visible: root.walletStore.isMultiNetworkEnabled
}
StatusDescriptionListItem {
height: 64
subTitle: qsTr("Accounts")
}
StatusSectionHeadline {
text: qsTr("Generated from Your Seed Phrase")
leftPadding: Style.current.padding
topPadding: Style.current.halfPadding
bottomPadding: Style.current.halfPadding/2
}
2022-03-01 14:40:53 +00:00
Repeater {
model: walletStore.generatedAccounts
delegate: WalletAccountDelegate {
account: model
onGoToAccountView: {
root.goToAccountView(model.address)
}
2022-03-01 14:40:53 +00:00
}
}
StatusSectionHeadline {
text: qsTr("Imported")
leftPadding: Style.current.padding
topPadding: Style.current.halfPadding
bottomPadding: Style.current.halfPadding/2
}
2022-03-01 14:40:53 +00:00
Repeater {
model: walletStore.importedAccounts
delegate: WalletAccountDelegate {
account: model
onGoToAccountView: {
root.goToAccountView(model.address)
}
2022-03-01 14:40:53 +00:00
}
}
StatusSectionHeadline {
text: qsTr("Watch-Only")
leftPadding: Style.current.padding
topPadding: Style.current.halfPadding
bottomPadding: Style.current.halfPadding/2
}
2022-03-01 14:40:53 +00:00
Repeater {
model: walletStore.watchOnlyAccounts
delegate: WalletAccountDelegate {
account: model
onGoToAccountView: {
root.goToAccountView(model.address)
}
2022-03-01 14:40:53 +00:00
}
}
Item {
height: Style.current.bigPadding
width: parent.width
}
}