mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user