password max length prompt (#9248)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2024-09-04 11:31:13 +08:00
committed by GitHub
parent 04c0f66ca9
commit 29e12b84a9
9 changed files with 47 additions and 16 deletions

View File

@@ -857,6 +857,7 @@ void setPasswordDialog({VoidCallback? notEmptyCallback}) async {
// SpecialCharacterValidationRule(),
MinCharactersValidationRule(8),
];
final maxLength = bind.mainMaxEncryptLen();
gFFI.dialogManager.show((setState, close, context) {
submit() {
@@ -915,6 +916,7 @@ void setPasswordDialog({VoidCallback? notEmptyCallback}) async {
errMsg0 = '';
});
},
maxLength: maxLength,
),
),
],
@@ -941,6 +943,7 @@ void setPasswordDialog({VoidCallback? notEmptyCallback}) async {
errMsg1 = '';
});
},
maxLength: maxLength,
),
),
],

View File

@@ -2512,6 +2512,7 @@ void changeSocks5Proxy() async {
: Icons.visibility))),
controller: pwdController,
enabled: !isOptFixed,
maxLength: bind.mainMaxEncryptLen(),
)),
),
],