Refact/verification code input check (#6924)

* Refact, login verification code, input check

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* Refact, settings, enable 2fa, dialog input

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* Refact. Connect, 2fa code, input check

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* refact, 2Fa text field, input formatter, only digits

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* refact, error message

Signed-off-by: fufesou <shuanglongchen@yeah.net>

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2024-01-19 23:36:32 -08:00
committed by GitHub
parent d39129887b
commit 06b3894249
40 changed files with 374 additions and 87 deletions

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", "Email 验证码必须是 6 个字符。"),
("2FA code must be 6 digits.", "2FA 码必须是6位数字。"),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", "Bitte richten Sie jetzt Ihren Authentifikator ein. Sie können eine Authentifizierungs-App wie Authy, Microsoft oder Google Authenticator auf Ihrem Telefon oder Desktop verwenden.\n\nScannen Sie den QR-Code mit Ihrer App und geben Sie den Code ein, den Ihre App anzeigt, um die Zwei-Faktor-Authentifizierung zu aktivieren."),
("wrong-2fa-code", "Der Code kann nicht verifiziert werden. Prüfen Sie, ob der Code und die lokalen Zeiteinstellungen korrekt sind."),
("enter-2fa-title", "Zwei-Faktor-Authentifizierung"),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}

View File

@@ -585,5 +585,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("enable-2fa-desc", ""),
("wrong-2fa-code", ""),
("enter-2fa-title", ""),
("Email verification code must be 6 characters.", ""),
("2FA code must be 6 digits.", ""),
].iter().cloned().collect();
}