diff --git a/flutter/lib/common/widgets/custom_password.dart b/flutter/lib/common/widgets/custom_password.dart new file mode 100644 index 00000000..99ece243 --- /dev/null +++ b/flutter/lib/common/widgets/custom_password.dart @@ -0,0 +1,121 @@ +// https://github.com/rodrigobastosv/fancy_password_field +import 'package:flutter/material.dart'; +import 'package:flutter_hbb/common.dart'; +import 'package:get/get.dart'; +import 'package:password_strength/password_strength.dart'; + +abstract class ValidationRule { + String get name; + bool validate(String value); +} + +class UppercaseValidationRule extends ValidationRule { + @override + String get name => translate('uppercase'); + @override + bool validate(String value) { + return value.contains(RegExp(r'[A-Z]')); + } +} + +class LowercaseValidationRule extends ValidationRule { + @override + String get name => translate('lowercase'); + + @override + bool validate(String value) { + return value.contains(RegExp(r'[a-z]')); + } +} + +class DigitValidationRule extends ValidationRule { + @override + String get name => translate('digit'); + + @override + bool validate(String value) { + return value.contains(RegExp(r'[0-9]')); + } +} + +class SpecialCharacterValidationRule extends ValidationRule { + @override + String get name => translate('special character'); + + @override + bool validate(String value) { + return value.contains(RegExp(r'[!@#$%^&*(),.?":{}|<>]')); + } +} + +class MinCharactersValidationRule extends ValidationRule { + final int _numberOfCharacters; + MinCharactersValidationRule(this._numberOfCharacters); + + @override + String get name => translate('length>=$_numberOfCharacters'); + + @override + bool validate(String value) { + return value.length >= _numberOfCharacters; + } +} + +class PasswordStrengthIndicator extends StatelessWidget { + final RxString password; + final double weakMedium = 0.33; + final double mediumStrong = 0.67; + const PasswordStrengthIndicator({Key? key, required this.password}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return Obx(() { + var strength = estimatePasswordStrength(password.value); + return Row( + children: [ + Expanded( + child: _indicator( + password.isEmpty ? Colors.grey : _getColor(strength))), + Expanded( + child: _indicator(password.isEmpty || strength < weakMedium + ? Colors.grey + : _getColor(strength))), + Expanded( + child: _indicator(password.isEmpty || strength < mediumStrong + ? Colors.grey + : _getColor(strength))), + Text(password.isEmpty ? '' : translate(_getLabel(strength))) + .marginOnly(left: password.isEmpty ? 0 : 8), + ], + ); + }); + } + + Widget _indicator(Color color) { + return Container( + height: 8, + color: color, + ); + } + + String _getLabel(double strength) { + if (strength < weakMedium) { + return 'Weak'; + } else if (strength < mediumStrong) { + return 'Medium'; + } else { + return 'Strong'; + } + } + + Color _getColor(double strength) { + if (strength < weakMedium) { + return Colors.yellow; + } else if (strength < mediumStrong) { + return Colors.blue; + } else { + return Colors.green; + } + } +} diff --git a/flutter/lib/desktop/pages/desktop_home_page.dart b/flutter/lib/desktop/pages/desktop_home_page.dart index 471a84b1..65c38e06 100644 --- a/flutter/lib/desktop/pages/desktop_home_page.dart +++ b/flutter/lib/desktop/pages/desktop_home_page.dart @@ -6,6 +6,7 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/material.dart' hide MenuItem; import 'package:flutter/services.dart'; import 'package:flutter_hbb/common.dart'; +import 'package:flutter_hbb/common/widgets/custom_password.dart'; import 'package:flutter_hbb/consts.dart'; import 'package:flutter_hbb/desktop/pages/connection_page.dart'; import 'package:flutter_hbb/desktop/pages/desktop_setting_page.dart'; @@ -543,6 +544,14 @@ void setPasswordDialog() async { final p1 = TextEditingController(text: pw); var errMsg0 = ""; var errMsg1 = ""; + final RxString rxPass = p0.text.obs; + final rules = [ + DigitValidationRule(), + UppercaseValidationRule(), + LowercaseValidationRule(), + // SpecialCharacterValidationRule(), + MinCharactersValidationRule(8), + ]; gFFI.dialogManager.show((setState, close) { submit() { @@ -551,15 +560,20 @@ void setPasswordDialog() async { errMsg1 = ""; }); final pass = p0.text.trim(); - if (pass.length < 6 && pass.isNotEmpty) { - setState(() { - errMsg0 = translate("Too short, at least 6 characters."); - }); - return; + if (pass.isNotEmpty) { + for (var r in rules) { + if (!r.validate(pass)) { + setState(() { + errMsg0 = '${translate('Prompt')}: ${r.name}'; + }); + return; + } + } } if (p1.text.trim() != pass) { setState(() { - errMsg1 = translate("The confirmation is not identical."); + errMsg1 = + '${translate('Prompt')}: ${translate("The confirmation is not identical.")}'; }); return; } @@ -579,23 +593,44 @@ void setPasswordDialog() async { ), Row( children: [ - ConstrainedBox( - constraints: const BoxConstraints(minWidth: 100), - child: Text( - "${translate('Password')}:", - textAlign: TextAlign.start, - ).marginOnly(bottom: 16.0)), - const SizedBox( - width: 24.0, - ), Expanded( child: TextField( obscureText: true, decoration: InputDecoration( + isDense: true, + contentPadding: EdgeInsets.all(15), + labelText: translate('Password'), border: const OutlineInputBorder(), errorText: errMsg0.isNotEmpty ? errMsg0 : null), controller: p0, focusNode: FocusNode()..requestFocus(), + onChanged: (value) { + rxPass.value = value; + }, + ), + ), + ], + ), + Row( + children: [ + Expanded(child: PasswordStrengthIndicator(password: rxPass)), + ], + ).marginSymmetric(vertical: 8), + const SizedBox( + height: 8.0, + ), + Row( + children: [ + Expanded( + child: TextField( + obscureText: true, + decoration: InputDecoration( + isDense: true, + contentPadding: EdgeInsets.all(15), + border: const OutlineInputBorder(), + labelText: translate('Confirmation'), + errorText: errMsg1.isNotEmpty ? errMsg1 : null), + controller: p1, ), ), ], @@ -603,26 +638,24 @@ void setPasswordDialog() async { const SizedBox( height: 8.0, ), - Row( - children: [ - ConstrainedBox( - constraints: const BoxConstraints(minWidth: 100), - child: Text("${translate('Confirmation')}:") - .marginOnly(bottom: 16.0)), - const SizedBox( - width: 24.0, - ), - Expanded( - child: TextField( - obscureText: true, - decoration: InputDecoration( - border: const OutlineInputBorder(), - errorText: errMsg1.isNotEmpty ? errMsg1 : null), - controller: p1, - ), - ), - ], - ), + Obx(() => Wrap( + runSpacing: 8, + spacing: 4, + children: rules.map((e) { + var checked = e.validate(rxPass.value.trim()); + return Chip( + label: Text( + e.name, + style: TextStyle( + color: checked + ? const Color(0xFF0A9471) + : Color.fromARGB(255, 198, 86, 157)), + ), + backgroundColor: checked + ? const Color(0xFFD0F7ED) + : Color.fromARGB(255, 247, 205, 232)); + }).toList(), + )) ], ), ), diff --git a/flutter/pubspec.yaml b/flutter/pubspec.yaml index 705f4650..f096218b 100644 --- a/flutter/pubspec.yaml +++ b/flutter/pubspec.yaml @@ -93,6 +93,7 @@ dependencies: auto_size_text: ^3.0.0 bot_toast: ^4.0.3 win32: any + password_strength: ^0.2.0 dev_dependencies: diff --git a/src/lang/ca.rs b/src/lang/ca.rs index d54b588c..bbcea134 100644 --- a/src/lang/ca.rs +++ b/src/lang/ca.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/cn.rs b/src/lang/cn.rs index 61da5d33..2f56b6da 100644 --- a/src/lang/cn.rs +++ b/src/lang/cn.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", "使用软件渲染"), ("config_input", "为了能够通过键盘控制远程桌面, 请给予 RustDesk \"输入监控\" 权限。"), ("request_elevation_tip", "如果对面有人, 也可以请求提升权限。"), - ("Wait","等待"), + ("Wait", "等待"), ("Elevation Error", "提权失败"), ("Ask the remote user for authentication", "请求远端用户授权"), ("Choose this if the remote account is administrator", "当对面电脑是管理员账号时选择该选项"), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", "请求提权"), ("wait_accept_uac_tip", "请等待远端用户确认UAC对话框。"), ("Elevate successfully", "提权成功"), + ("uppercase", "大写字母"), + ("lowercase", "小写字母"), + ("digit", "数字"), + ("special character", "特殊字符"), + ("length>=8", "长度不小于8"), + ("Weak", "弱"), + ("Medium", "中"), + ("Strong", "强"), ].iter().cloned().collect(); } diff --git a/src/lang/cs.rs b/src/lang/cs.rs index d43a534e..8852d602 100644 --- a/src/lang/cs.rs +++ b/src/lang/cs.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/da.rs b/src/lang/da.rs index 0f7823b7..53ae46bd 100644 --- a/src/lang/da.rs +++ b/src/lang/da.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/de.rs b/src/lang/de.rs index 74c674b5..292b2ed2 100644 --- a/src/lang/de.rs +++ b/src/lang/de.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", "Software-Rendering immer verwenden"), ("config_input", "Um den entfernten Desktop mit der Tastatur steuern zu können, müssen Sie RustDesk \"Input Monitoring\"-Rechte erteilen."), ("request_elevation_tip", "Sie können auch erhöhte Rechte anfordern, wenn sich jemand auf der Gegenseite befindet."), - ("Wait","Warten"), + ("Wait", "Warten"), ("Elevation Error", "Berechtigungsfehler"), ("Ask the remote user for authentication", "Den entfernten Benutzer zur Authentifizierung auffordern"), ("Choose this if the remote account is administrator", "Wählen Sie dies, wenn das entfernte Konto Administrator ist"), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", "Erhöhte Rechte anfordern"), ("wait_accept_uac_tip", "Bitte warten Sie, bis der entfernte Benutzer den UAC-Dialog akzeptiert hat."), ("Elevate successfully", "Erhöhung der Rechte erfolgreich"), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/eo.rs b/src/lang/eo.rs index 8503d153..955a3287 100644 --- a/src/lang/eo.rs +++ b/src/lang/eo.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/es.rs b/src/lang/es.rs index c06d3f77..bae1b5cb 100644 --- a/src/lang/es.rs +++ b/src/lang/es.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", "Usar siempre renderizado por software"), ("config_input", "Para controlar el escritorio remoto con el teclado necesitas dar a RustDesk permisos de \"Monitorización de entrada\"."), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/fa.rs b/src/lang/fa.rs index 6bdd0506..a257425f 100644 --- a/src/lang/fa.rs +++ b/src/lang/fa.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/fr.rs b/src/lang/fr.rs index bbc50e4a..6edec847 100644 --- a/src/lang/fr.rs +++ b/src/lang/fr.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", "Utiliser toujours le rendu logiciel"), ("config_input", "Afin de contrôler le bureau à distance avec le clavier, vous devez accorder à Rustdesk l'autorisation \"Surveillance de l’entrée\"."), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/gr.rs b/src/lang/gr.rs index 7a0e0b35..81a50bcd 100644 --- a/src/lang/gr.rs +++ b/src/lang/gr.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/hu.rs b/src/lang/hu.rs index 342a29bc..9e1a4d98 100644 --- a/src/lang/hu.rs +++ b/src/lang/hu.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/id.rs b/src/lang/id.rs index 671c2a8f..65c30ec6 100644 --- a/src/lang/id.rs +++ b/src/lang/id.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/it.rs b/src/lang/it.rs index 858edbd8..f94669d3 100644 --- a/src/lang/it.rs +++ b/src/lang/it.rs @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", "Richiedi elevazione dei diritti"), ("wait_accept_uac_tip", "Attendere che l'utente remoto accetti la finestra di dialogo UAC."), ("Elevate successfully", "Elevazione dei diritti effettuata con successo"), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ja.rs b/src/lang/ja.rs index 4343d5ce..6ebb11ef 100644 --- a/src/lang/ja.rs +++ b/src/lang/ja.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ko.rs b/src/lang/ko.rs index c9874b2d..a6825b52 100644 --- a/src/lang/ko.rs +++ b/src/lang/ko.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/kz.rs b/src/lang/kz.rs index 049d490a..816eb370 100644 --- a/src/lang/kz.rs +++ b/src/lang/kz.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/pl.rs b/src/lang/pl.rs index 5d0d575b..df985ccc 100644 --- a/src/lang/pl.rs +++ b/src/lang/pl.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/pt_PT.rs b/src/lang/pt_PT.rs index 0749678d..dba37b5d 100644 --- a/src/lang/pt_PT.rs +++ b/src/lang/pt_PT.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ptbr.rs b/src/lang/ptbr.rs index f6c43aab..31c9153f 100644 --- a/src/lang/ptbr.rs +++ b/src/lang/ptbr.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ru.rs b/src/lang/ru.rs index 77f64e75..b22d49cc 100644 --- a/src/lang/ru.rs +++ b/src/lang/ru.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", "Использовать программную визуализацию"), ("config_input", "Чтобы управлять удалённым рабочим столом с помощью клавиатуры, необходимо предоставить RustDesk разрешения \"Мониторинг ввода\"."), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sk.rs b/src/lang/sk.rs index 954e3ae9..56d14652 100644 --- a/src/lang/sk.rs +++ b/src/lang/sk.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sl.rs b/src/lang/sl.rs index 3b4ee16d..3d2ad3be 100755 --- a/src/lang/sl.rs +++ b/src/lang/sl.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sq.rs b/src/lang/sq.rs index 804a8879..165597e7 100644 --- a/src/lang/sq.rs +++ b/src/lang/sq.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sr.rs b/src/lang/sr.rs index 9ecdd184..739d5357 100644 --- a/src/lang/sr.rs +++ b/src/lang/sr.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sv.rs b/src/lang/sv.rs index ccf1eed8..498131d0 100644 --- a/src/lang/sv.rs +++ b/src/lang/sv.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/template.rs b/src/lang/template.rs index f8a7a3bc..adb05c94 100644 --- a/src/lang/template.rs +++ b/src/lang/template.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/th.rs b/src/lang/th.rs index 5bd969bd..2b062c3f 100644 --- a/src/lang/th.rs +++ b/src/lang/th.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/tr.rs b/src/lang/tr.rs index ee661d9b..a4a179c8 100644 --- a/src/lang/tr.rs +++ b/src/lang/tr.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/tw.rs b/src/lang/tw.rs index aebf8917..cd9f270e 100644 --- a/src/lang/tw.rs +++ b/src/lang/tw.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", "使用軟件渲染"), ("config_input", ""), ("request_elevation_tip", "如果對面有人, 也可以請求提升權限。"), - ("Wait","等待"), + ("Wait", "等待"), ("Elevation Error", "提權失敗"), ("Ask the remote user for authentication", "請求遠端用戶授權"), ("Choose this if the remote account is administrator", "當對面電腦是管理員賬號時選擇該選項"), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", "請求提權"), ("wait_accept_uac_tip", "請等待遠端用戶確認UAC對話框。"), ("Elevate successfully", "提權成功"), + ("uppercase", "大寫字母"), + ("lowercase", "小寫字母"), + ("digit", "數字"), + ("special character", "特殊字符"), + ("length>=8", "長度不小於8"), + ("Weak", "弱"), + ("Medium", "中"), + ("Strong", "強"), ].iter().cloned().collect(); } diff --git a/src/lang/ua.rs b/src/lang/ua.rs index 784592ff..ff24baab 100644 --- a/src/lang/ua.rs +++ b/src/lang/ua.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); } diff --git a/src/lang/vn.rs b/src/lang/vn.rs index ac62631c..6988efba 100644 --- a/src/lang/vn.rs +++ b/src/lang/vn.rs @@ -414,7 +414,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Always use software rendering", ""), ("config_input", ""), ("request_elevation_tip", ""), - ("Wait",""), + ("Wait", ""), ("Elevation Error", ""), ("Ask the remote user for authentication", ""), ("Choose this if the remote account is administrator", ""), @@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Request Elevation", ""), ("wait_accept_uac_tip", ""), ("Elevate successfully", ""), + ("uppercase", ""), + ("lowercase", ""), + ("digit", ""), + ("special character", ""), + ("length>=8", ""), + ("Weak", ""), + ("Medium", ""), + ("Strong", ""), ].iter().cloned().collect(); }