mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2025-01-06 02:37:21 +03:00
password prompt: input focus, accept on enter
This commit is contained in:
parent
0bc6c65397
commit
f6af80c3e3
@ -19,7 +19,9 @@ DefaultDialog {
|
||||
TextField {
|
||||
id: password
|
||||
echoMode: TextInput.Password
|
||||
focus: true
|
||||
Layout.fillWidth: true
|
||||
onAccepted: promptAccepted()
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
@ -33,7 +35,7 @@ DefaultDialog {
|
||||
Button {
|
||||
text: qsTr("Ok")
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignBottom
|
||||
onClicked: {close(); accepted()}
|
||||
onClicked: promptAccepted()
|
||||
}
|
||||
Button {
|
||||
text: qsTr("Cancel")
|
||||
@ -42,6 +44,11 @@ DefaultDialog {
|
||||
}
|
||||
}
|
||||
|
||||
function promptAccepted() {
|
||||
close();
|
||||
accepted()
|
||||
}
|
||||
|
||||
function clear() {
|
||||
password.text = ''
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user