fix(@desktop/wallet): Can't scroll the list of wallets till the end of the list

fixes #5025
This commit is contained in:
Khushboo Mehta 2022-03-15 15:59:58 +01:00 committed by Iuri Matias
parent f5e67fc658
commit 41f9e70339
2 changed files with 100 additions and 105 deletions

View File

@ -19,70 +19,56 @@ ScrollView {
id: root id: root
property var emojiPopup property var emojiPopup
anchors.fill: parent
contentHeight: advancedContainer.height + 100
clip: true
property WalletStore walletStore property WalletStore walletStore
Item { clip: true
id: advancedContainer
anchors.top: parent.top
anchors.left: parent.left
StackLayout {
id: stackContainer
StackLayout { anchors.fill: parent
id: stackContainer currentIndex: 0
anchors.fill: parent MainView {
currentIndex: 0 id: main
Layout.preferredWidth: 560
leftPadding: 64
topPadding: 64
walletStore: root.walletStore
MainView { onGoToNetworksView: {
walletStore: root.walletStore stackContainer.currentIndex = 1
anchors.topMargin: 64
anchors.top: parent.top
anchors.leftMargin: 64
anchors.left: parent.left
width: 560
onGoToNetworksView: {
stackContainer.currentIndex = 1
}
onGoToAccountView: {
root.walletStore.switchAccountByAddress(address)
stackContainer.currentIndex = 2
}
onGoToDappPermissionsView: {
stackContainer.currentIndex = 3
}
} }
NetworksView { onGoToAccountView: {
walletStore: root.walletStore root.walletStore.switchAccountByAddress(address)
anchors.fill: parent stackContainer.currentIndex = 2
onGoBack: {
stackContainer.currentIndex = 0
}
} }
AccountView { onGoToDappPermissionsView: {
walletStore: root.walletStore stackContainer.currentIndex = 3
emojiPopup: root.emojiPopup
anchors.fill: parent
onGoBack: {
stackContainer.currentIndex = 0
}
} }
}
DappPermissionsView { NetworksView {
walletStore: root.walletStore walletStore: root.walletStore
anchors.fill: parent onGoBack: {
onGoBack: { stackContainer.currentIndex = 0
stackContainer.currentIndex = 0 }
} }
AccountView {
walletStore: root.walletStore
emojiPopup: root.emojiPopup
onGoBack: {
stackContainer.currentIndex = 0
}
}
DappPermissionsView {
walletStore: root.walletStore
onGoBack: {
stackContainer.currentIndex = 0
} }
} }
} }

View File

@ -5,6 +5,7 @@ import shared.status 1.0
import shared.panels 1.0 import shared.panels 1.0
import StatusQ.Core.Theme 0.1 import StatusQ.Core.Theme 0.1
import StatusQ.Core 0.1 import StatusQ.Core 0.1
import StatusQ.Components 0.1
import "../../stores" import "../../stores"
import "../../controls" import "../../controls"
@ -32,13 +33,20 @@ Column {
width: parent.width width: parent.width
} }
StatusSettingsLineButton { StatusListItem {
text: qsTr("Manage Assets & List") title: qsTr("Manage Assets & List")
height: 64 height: 64
width: parent.width
onClicked: Global.openPopup(tokenSettingsModalComponent) onClicked: Global.openPopup(tokenSettingsModalComponent)
components: [
StatusIcon {
icon: "chevron-down"
rotation: 270
color: Theme.palette.baseColor1
}
]
} }
Component { Component {
id: tokenSettingsModalComponent id: tokenSettingsModalComponent
TokenSettingsModal { TokenSettingsModal {
@ -51,61 +59,55 @@ Column {
Separator { Separator {
height: 17 height: 17
anchors.left: parent.left
anchors.leftMargin: -Style.current.padding
anchors.right: parent.right
anchors.rightMargin: -Style.current.padding
} }
StatusSettingsLineButton { StatusListItem {
text: qsTr("DApp Permissions") title: qsTr("DApp Permissions")
currentValue: {
return qsTr("%1 DApps connected").arg(root.walletStore.dappList.count)
}
height: 64 height: 64
onClicked: goToDappPermissionsView()
}
Separator {
height: 17
anchors.left: parent.left
anchors.leftMargin: -Style.current.padding
anchors.right: parent.right
anchors.rightMargin: -Style.current.padding
}
StatusSettingsLineButton {
text: qsTr("Networks")
height: 64
visible: root.walletStore.isMultiNetworkEnabled
onClicked: goToNetworksView()
}
Separator {
height: 17
anchors.left: parent.left
anchors.leftMargin: -Style.current.padding
anchors.right: parent.right
anchors.rightMargin: -Style.current.padding
visible: root.walletStore.isMultiNetworkEnabled
}
Item {
height: Style.current.bigPadding
width: parent.width width: parent.width
onClicked: goToDappPermissionsView()
components: [
StatusIcon {
icon: "chevron-down"
rotation: 270
color: Theme.palette.baseColor1
}
]
} }
StatusBaseText { Separator {
id: accountsText height: 17
text: qsTr("Accounts") }
font.pixelSize: 15
color: Theme.palette.directColor1 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 { StatusSectionHeadline {
text: qsTr("Generated from Your Seed Phrase") text: qsTr("Generated from Your Seed Phrase")
topPadding: Style.current.bigPadding leftPadding: Style.current.padding
bottomPadding: Style.current.padding topPadding: Style.current.halfPadding
bottomPadding: Style.current.halfPadding/2
} }
Repeater { Repeater {
@ -120,8 +122,9 @@ Column {
StatusSectionHeadline { StatusSectionHeadline {
text: qsTr("Imported") text: qsTr("Imported")
topPadding: Style.current.bigPadding leftPadding: Style.current.padding
bottomPadding: Style.current.padding topPadding: Style.current.halfPadding
bottomPadding: Style.current.halfPadding/2
} }
Repeater { Repeater {
@ -136,8 +139,9 @@ Column {
StatusSectionHeadline { StatusSectionHeadline {
text: qsTr("Watch-Only") text: qsTr("Watch-Only")
topPadding: Style.current.bigPadding leftPadding: Style.current.padding
bottomPadding: Style.current.padding topPadding: Style.current.halfPadding
bottomPadding: Style.current.halfPadding/2
} }
Repeater { Repeater {
@ -149,4 +153,9 @@ Column {
} }
} }
} }
}
Item {
height: Style.current.bigPadding
width: parent.width
}
}