fix(BRIDGE-424): resolved wrong layout ordering; u2f pin option is now treated as a 'password'

This commit is contained in:
Atanas Janeshliev
2025-09-29 11:58:09 +02:00
parent edf903fd21
commit 7fce966a65
4 changed files with 12 additions and 6 deletions

View File

@ -105,6 +105,7 @@ Dialog {
Layout.preferredWidth: 240
Layout.bottomMargin: 16
colorScheme: root.colorScheme
echoMode: root.notification.isTextFieldPassword ? TextInput.Password : TextInput.Normal
text: root.textFieldText
visible: root.notification && root.notification.useTextField
@ -116,10 +117,14 @@ Dialog {
root.notification.textFieldChanged("")
textField.clear();
}
function onFocusTextField() {
textField.focus = true;
}
function onHideTextFieldPassword() {
if (root.notification.isTextFieldPassword) {
textField.hidePassword();
}
}
}
}

View File

@ -40,11 +40,10 @@ QtObject {
property string subtitle
property string username
// Whether to display a spinner.
property bool busyIndicator: false
property bool busyIndicator: false // Whether to display a spinner.
// Whether to display a text input field.
property bool useTextField: false
property bool useTextField: false // Whether to display a text input field.
property bool isTextFieldPassword: false // Whether the additional text input field is for a password.
// Source for an additional image, won't be displayed if empty.
property string additionalImageSrc: ""
@ -53,6 +52,7 @@ QtObject {
signal clearTextFieldRequested()
signal textFieldChanged(string value)
signal focusTextField()
signal hideTextFieldPassword()
onActiveChanged: {
dismissed = false;

View File

@ -1290,6 +1290,7 @@ QtObject {
icon: "./icons/ic-exclamation-circle-filled.svg"
type: Notification.NotificationType.Info
useTextField: true
isTextFieldPassword: true
onTextFieldChanged: function(value) {
root.fidoPinRequested.fidoPinInput = value;
@ -1298,6 +1299,7 @@ QtObject {
function reset() {
root.fidoPinRequested.active = false;
root.fidoPinRequested.clearTextFieldRequested();
root.fidoPinRequested.hideTextFieldPassword();
root.fidoPinRequested.type = Notification.NotificationType.Info;
}
function clearAndFocusTextField() {

View File

@ -22,7 +22,6 @@ FocusScope {
Login,
TOTP,
FIDO,
TOTPOrFIDO,
MailboxPassword,
HV
}