mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 11:47:46 +00:00
Don't allow manually inputting a OTP when they're auto-generated
This commit is contained in:
parent
47f6d1035e
commit
dfe0803d76
1 changed files with 6 additions and 9 deletions
|
@ -63,15 +63,10 @@ QQC2.Control {
|
||||||
function updateFields() {
|
function updateFields() {
|
||||||
usernameField.text = LauncherCore.currentProfile.account.name;
|
usernameField.text = LauncherCore.currentProfile.account.name;
|
||||||
passwordField.text = !LauncherCore.currentProfile.account.needsPassword && LauncherCore.currentProfile.account.rememberPassword ? LauncherCore.currentProfile.account.getPassword() : "";
|
passwordField.text = !LauncherCore.currentProfile.account.needsPassword && LauncherCore.currentProfile.account.rememberPassword ? LauncherCore.currentProfile.account.getPassword() : "";
|
||||||
otpField.text = "";
|
if (LauncherCore.currentProfile.account.rememberOTP) {
|
||||||
}
|
otpField.text = "Auto-generated";
|
||||||
|
} else {
|
||||||
Connections {
|
otpField.text = "";
|
||||||
target: LauncherCore
|
|
||||||
|
|
||||||
function onCurrentProfileChanged() {
|
|
||||||
page.updateFields();
|
|
||||||
LauncherCore.refreshLogoImage();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,6 +246,8 @@ QQC2.Control {
|
||||||
|
|
||||||
FormCard.FormTextFieldDelegate {
|
FormCard.FormTextFieldDelegate {
|
||||||
id: otpField
|
id: otpField
|
||||||
|
|
||||||
|
enabled: !LauncherCore.currentProfile.account.rememberOTP
|
||||||
label: i18n("One-time Password")
|
label: i18n("One-time Password")
|
||||||
visible: LauncherCore.currentProfile.account.useOTP
|
visible: LauncherCore.currentProfile.account.useOTP
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue