From 5497ad83e04ce6972d413254b3520df507280fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lollipopkit=F0=9F=8F=B3=EF=B8=8F=E2=80=8D=E2=9A=A7?= =?UTF-8?q?=EF=B8=8F?= <10864310+lollipopkit@users.noreply.github.com> Date: Sun, 17 Aug 2025 17:56:26 +0800 Subject: [PATCH] opt.: bio auth settings --- l10n.yaml | 1 - lib/app.dart | 11 ++--------- lib/view/page/setting/platform/platform_pub.dart | 14 ++++++++------ pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 5 files changed, 13 insertions(+), 19 deletions(-) diff --git a/l10n.yaml b/l10n.yaml index 5caf7433..b5f4f6d0 100644 --- a/l10n.yaml +++ b/l10n.yaml @@ -2,5 +2,4 @@ arb-dir: lib/l10n template-arb-file: app_en.arb output-localization-file: l10n.dart output-dir: lib/generated/l10n -synthetic-package: false untranslated-messages-file: untranlated.json \ No newline at end of file diff --git a/lib/app.dart b/lib/app.dart index 141bc57a..baeb8fbf 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -3,7 +3,7 @@ import 'package:fl_lib/fl_lib.dart'; import 'package:fl_lib/generated/l10n/lib_l10n.dart'; import 'package:flutter/material.dart'; import 'package:icons_plus/icons_plus.dart'; -import 'package:responsive_framework/responsive_framework.dart'; +import 'package:responsive_framework/responsive_framework.dart' hide ResponsiveUtils; import 'package:server_box/core/extension/context/locale.dart'; import 'package:server_box/data/res/build_data.dart'; import 'package:server_box/data/res/store.dart'; @@ -79,14 +79,7 @@ class MyApp extends StatelessWidget { return MaterialApp( key: ValueKey(locale), - builder: (context, child) => ResponsiveBreakpoints.builder( - child: child ?? UIs.placeholder, - breakpoints: const [ - Breakpoint(start: 0, end: 600, name: MOBILE), - Breakpoint(start: 600, end: 1199, name: TABLET), - Breakpoint(start: 1199, end: 3840, name: DESKTOP), - ], - ), + builder: ResponsivePoints.builder, locale: locale, localizationsDelegates: const [LibLocalizations.delegate, ...AppLocalizations.localizationsDelegates], supportedLocales: AppLocalizations.supportedLocales, diff --git a/lib/view/page/setting/platform/platform_pub.dart b/lib/view/page/setting/platform/platform_pub.dart index 0fea6921..d287d0fc 100644 --- a/lib/view/page/setting/platform/platform_pub.dart +++ b/lib/view/page/setting/platform/platform_pub.dart @@ -4,23 +4,27 @@ import 'package:server_box/data/res/store.dart'; abstract final class PlatformPublicSettings { static Widget get buildBioAuth { - return ExpandTile(title: Text(libL10n.bioAuth), children: [_buildBioAuth(), _buildBioAuthDelay()]); + return ExpandTile( + leading: const Icon(Icons.fingerprint), + title: Text(libL10n.bioAuth), + children: [_buildBioAuth(), _buildBioAuthDelay()], + ); } static Widget _buildBioAuthDelay() { return FutureWidget( future: LocalAuth.isAvail, loading: ListTile( - title: Text(libL10n.delay), + title: Text('${libL10n.delay} (${libL10n.second})'), subtitle: const Text('...', style: UIs.textGrey), ), error: (e, _) => ListTile( - title: Text(libL10n.delay), + title: Text('${libL10n.delay} (${libL10n.second})'), subtitle: Text('${libL10n.fail}: $e', style: UIs.textGrey), ), success: (can) { return ListTile( - title: Text(libL10n.delay), + title: Text('${libL10n.delay} (${libL10n.second})'), trailing: can == true ? Stores.setting.delayBioAuthLock.fieldWidget() : null, ); }, @@ -31,7 +35,6 @@ abstract final class PlatformPublicSettings { return FutureWidget( future: LocalAuth.isAvail, loading: ListTile( - leading: const Icon(Icons.fingerprint), title: Text(libL10n.switch_), subtitle: const Text('...', style: UIs.textGrey), ), @@ -42,7 +45,6 @@ abstract final class PlatformPublicSettings { success: (can) { can ??= false; return ListTile( - leading: const Icon(Icons.fingerprint), title: Text(libL10n.switch_), subtitle: can ? null : Text(libL10n.notExistFmt(libL10n.bioAuth), style: UIs.textGrey), trailing: can diff --git a/pubspec.lock b/pubspec.lock index 317883d6..182aacdb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -497,8 +497,8 @@ packages: dependency: "direct main" description: path: "." - ref: "v1.0.336" - resolved-ref: "403ec409389521b12f5ab278a7f306daab0504d3" + ref: "v1.0.338" + resolved-ref: d681131c436fa346bfb4675bca5c37cd38b1fdc2 url: "https://github.com/lppcg/fl_lib" source: git version: "0.0.1" diff --git a/pubspec.yaml b/pubspec.yaml index 57bf4b14..0d67f411 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -63,7 +63,7 @@ dependencies: fl_lib: git: url: https://github.com/lppcg/fl_lib - ref: v1.0.336 + ref: v1.0.338 dependency_overrides: # webdav_client_plus: