add navigation using enter + buttons will be clicked if enter (if but… (#556)

Enter navigation
This commit is contained in:
agalehaga 2024-02-17 23:09:05 +02:00 committed by GitHub
parent 16db23c159
commit 698cfe910c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 3655 additions and 4373 deletions

View file

@ -12,6 +12,8 @@ import "../Controls2/TextTypes"
PageType {
id: root
defaultActiveFocusItem: hostname.textField
BackButtonType {
id: backButton
@ -57,6 +59,8 @@ PageType {
onFocusChanged: {
textField.text = textField.text.replace(/^\s+|\s+$/g, '');
}
KeyNavigation.tab: username.textField
}
TextFieldWithHeaderType {
@ -65,6 +69,8 @@ PageType {
Layout.fillWidth: true
headerText: qsTr("Login to connect via SSH")
textFieldPlaceholderText: "root"
KeyNavigation.tab: secretData.textField
}
TextFieldWithHeaderType {
@ -85,15 +91,19 @@ PageType {
onFocusChanged: {
textField.text = textField.text.replace(/^\s+|\s+$/g, '');
}
KeyNavigation.tab: continueButton
}
BasicButtonType {
id: continueButton
Layout.fillWidth: true
Layout.topMargin: 24
text: qsTr("Continue")
onClicked: function() {
clickedFunc: function() {
forceActiveFocus()
if (!isCredentialsFilled()) {
return