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

View File

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

View File

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

View File

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