mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 23:34:24 +01:00
@@ -2,9 +2,9 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 585;
|
||||
static const int build = 588;
|
||||
static const String engine = "3.13.6";
|
||||
static const String buildAt = "2023-10-13 11:50:42";
|
||||
static const int modifications = 8;
|
||||
static const int script = 20;
|
||||
static const String buildAt = "2023-10-13 14:38:17";
|
||||
static const int modifications = 5;
|
||||
static const int script = 21;
|
||||
}
|
||||
|
||||
@@ -19,32 +19,28 @@ class PlatformPublicSettings {
|
||||
subtitle: Text('${l10n.failed}: $e', style: UIs.textGrey),
|
||||
),
|
||||
success: (can) {
|
||||
return can
|
||||
? ListTile(
|
||||
title: Text(l10n.bioAuth),
|
||||
subtitle: can
|
||||
? null
|
||||
: const Text('Error: Bio auth is not available',
|
||||
style: UIs.textGrey),
|
||||
trailing: can
|
||||
? StoreSwitch(
|
||||
prop: Stores.setting.useBioAuth,
|
||||
func: (val) async {
|
||||
if (val) {
|
||||
Stores.setting.useBioAuth.put(false);
|
||||
return;
|
||||
}
|
||||
// Only auth when turn off (val == false)
|
||||
final result = await BioAuth.auth(l10n.authRequired);
|
||||
// If failed, turn on again
|
||||
if (result != AuthResult.success) {
|
||||
Stores.setting.useBioAuth.put(true);
|
||||
}
|
||||
},
|
||||
)
|
||||
: null,
|
||||
)
|
||||
: UIs.placeholder;
|
||||
return ListTile(
|
||||
title: Text(l10n.bioAuth),
|
||||
subtitle:
|
||||
can ? null : const Text('Not available', style: UIs.textGrey),
|
||||
trailing: can
|
||||
? StoreSwitch(
|
||||
prop: Stores.setting.useBioAuth,
|
||||
func: (val) async {
|
||||
if (val) {
|
||||
Stores.setting.useBioAuth.put(false);
|
||||
return;
|
||||
}
|
||||
// Only auth when turn off (val == false)
|
||||
final result = await BioAuth.auth(l10n.authRequired);
|
||||
// If failed, turn on again
|
||||
if (result != AuthResult.success) {
|
||||
Stores.setting.useBioAuth.put(true);
|
||||
}
|
||||
},
|
||||
)
|
||||
: null,
|
||||
);
|
||||
},
|
||||
noData: UIs.placeholder,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user