mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2026-02-04 00:08:33 +00:00
fix(BRIDGE-424): resolved wrong layout ordering; u2f pin option is now treated as a 'password'
This commit is contained in:
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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() {
|
||||||
|
|||||||
@ -22,7 +22,6 @@ FocusScope {
|
|||||||
Login,
|
Login,
|
||||||
TOTP,
|
TOTP,
|
||||||
FIDO,
|
FIDO,
|
||||||
TOTPOrFIDO,
|
|
||||||
MailboxPassword,
|
MailboxPassword,
|
||||||
HV
|
HV
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user