add setting page

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-08-13 12:43:35 +08:00
parent f812adedff
commit 5887334c2e
8 changed files with 1066 additions and 460 deletions

View File

@@ -51,26 +51,24 @@ class ServerModel with ChangeNotifier {
kUseBothPasswords
].indexOf(_verificationMethod);
if (index < 0) {
_verificationMethod = kUseBothPasswords;
return kUseBothPasswords;
}
return _verificationMethod;
}
set verificationMethod(String method) {
_verificationMethod = method;
bind.mainSetOption(key: "verification-method", value: method);
}
String get temporaryPasswordLength {
final lengthIndex = ["6", "8", "10"].indexOf(_temporaryPasswordLength);
if (lengthIndex < 0) {
_temporaryPasswordLength = "6";
return "6";
}
return _temporaryPasswordLength;
}
set temporaryPasswordLength(String length) {
_temporaryPasswordLength = length;
bind.mainSetOption(key: "temporary-password-length", value: length);
}