From 00c9572b437cc96bf77fed2b0f17937c0b17827f Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:09:28 +0530 Subject: [PATCH 1/3] [auth] Remove double authentication for passkey --- auth/lib/ui/settings/security_section_widget.dart | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/auth/lib/ui/settings/security_section_widget.dart b/auth/lib/ui/settings/security_section_widget.dart index 9739053060..7cc6e870b8 100644 --- a/auth/lib/ui/settings/security_section_widget.dart +++ b/auth/lib/ui/settings/security_section_widget.dart @@ -102,16 +102,7 @@ class _SecuritySectionWidgetState extends State { trailingIcon: Icons.chevron_right_outlined, trailingIconIsMuted: true, onTap: () async { - final bool hasAuthenticated = await LocalAuthenticationService - .instance - .requestLocalAuthentication( - context, - context.l10n.authToViewPasskey, - ); - await PlatformUtil.refocusWindows(); - if (hasAuthenticated) { - await onPasskeyClick(context); - } + await onPasskeyClick(context); }, ), sectionOptionSpacing, From 8fa6adb16afab323f475ef2ae3d54e7b8d3a6dfe Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:09:58 +0530 Subject: [PATCH 2/3] [auth] Default to non-compact mode --- auth/lib/onboarding/view/onboarding_page.dart | 2 -- auth/lib/services/preference_service.dart | 6 ------ 2 files changed, 8 deletions(-) diff --git a/auth/lib/onboarding/view/onboarding_page.dart b/auth/lib/onboarding/view/onboarding_page.dart index af8793d9ab..dff1fbc179 100644 --- a/auth/lib/onboarding/view/onboarding_page.dart +++ b/auth/lib/onboarding/view/onboarding_page.dart @@ -8,7 +8,6 @@ import 'package:ente_auth/ente_theme_data.dart'; import 'package:ente_auth/events/trigger_logout_event.dart'; import "package:ente_auth/l10n/l10n.dart"; import 'package:ente_auth/locale.dart'; -import 'package:ente_auth/services/preference_service.dart'; import 'package:ente_auth/theme/text_style.dart'; import 'package:ente_auth/ui/account/email_entry_page.dart'; import 'package:ente_auth/ui/account/login_page.dart'; @@ -50,7 +49,6 @@ class _OnboardingPageState extends State { await autoLogoutAlert(context); }); super.initState(); - PreferenceService.instance.configureDefaults().ignore(); } @override diff --git a/auth/lib/services/preference_service.dart b/auth/lib/services/preference_service.dart index 73dc00fad9..ba43e69be3 100644 --- a/auth/lib/services/preference_service.dart +++ b/auth/lib/services/preference_service.dart @@ -57,12 +57,6 @@ class PreferenceService { await _prefs.setBool(kCompactMode, value); } - Future configureDefaults() async { - if (!_prefs.containsKey(kCompactMode)) { - await _prefs.setBool(kCompactMode, true); - } - } - Future setHideCodes(bool value) async { await _prefs.setBool(kShouldHideCodesKey, value); Bus.instance.fire(IconsChangedEvent()); From 87f7d3a4843c98defcf0a14553d32ab76a7f6bfd Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:12:16 +0530 Subject: [PATCH 3/3] [auth] Show theme option for windows & linux --- auth/lib/ui/settings_page.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/auth/lib/ui/settings_page.dart b/auth/lib/ui/settings_page.dart index 0e99a1ea36..fc00a1eefe 100644 --- a/auth/lib/ui/settings_page.dart +++ b/auth/lib/ui/settings_page.dart @@ -142,7 +142,10 @@ class SettingsPage extends StatelessWidget { sectionSpacing, ]); - if (Platform.isAndroid || kDebugMode) { + if (Platform.isAndroid || + Platform.isWindows || + Platform.isLinux || + kDebugMode) { contents.addAll([ const ThemeSwitchWidget(), sectionSpacing,