fix(@desktop/onboarding): add password fields autofocus

- update views exposed functions

Closes: #6577
This commit is contained in:
PavelS 2022-07-28 17:04:37 +03:00 committed by PavelS
parent 0419f8077d
commit 4d0bfcc501
2 changed files with 6 additions and 4 deletions

View File

@ -24,10 +24,9 @@ Item {
Component.onCompleted: { Component.onCompleted: {
root.password = root.startupStore.getPassword() root.password = root.startupStore.getPassword()
d.forcePasswordInputFocus()
} }
function forcePswInputFocus() { confPswInput.forceActiveFocus(Qt.MouseFocusReason)}
QtObject { QtObject {
id: d id: d
@ -46,6 +45,8 @@ Item {
root.startupStore.doPrimaryAction() root.startupStore.doPrimaryAction()
} }
function forcePasswordInputFocus() { confPswInput.forceActiveFocus(Qt.MouseFocusReason) }
} }
Column { Column {

View File

@ -18,10 +18,9 @@ Item {
Component.onCompleted: { Component.onCompleted: {
view.newPswText = root.startupStore.getPassword() view.newPswText = root.startupStore.getPassword()
view.confirmationPswText = root.startupStore.getPassword() view.confirmationPswText = root.startupStore.getPassword()
d.forcePasswordInputFocus()
} }
function forceNewPswInputFocus() { view.forceNewPswInputFocus() }
QtObject { QtObject {
id: d id: d
readonly property int zBehind: 1 readonly property int zBehind: 1
@ -31,6 +30,8 @@ Item {
root.startupStore.setPassword(view.newPswText) root.startupStore.setPassword(view.newPswText)
root.startupStore.doPrimaryAction() root.startupStore.doPrimaryAction()
} }
function forcePasswordInputFocus() { view.forceNewPswInputFocus() }
} }
Column { Column {