Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[auth] Use help website for FAQ

Neeraj Gupta5c0fe9c411f9
diff --git a/auth/lib/onboarding/view/onboarding_page.dart b/auth/lib/onboarding/view/onboarding_page.dart
index ec150080ab..af8793d9ab 100644
--- a/auth/lib/onboarding/view/onboarding_page.dart
+++ b/auth/lib/onboarding/view/onboarding_page.dart
@@ -50,7 +50,7 @@ class _OnboardingPageState extends State<OnboardingPage> {
await autoLogoutAlert(context);
});
super.initState();
- PreferenceService.instance.configureDefaults().ignore()
+ PreferenceService.instance.configureDefaults().ignore();
}
@override
diff --git a/auth/lib/ui/home/home_empty_state.dart b/auth/lib/ui/home/home_empty_state.dart
index 0632364ea4..68d9044aa6 100644
--- a/auth/lib/ui/home/home_empty_state.dart
+++ b/auth/lib/ui/home/home_empty_state.dart
@@ -1,10 +1,10 @@
import 'package:ente_auth/l10n/l10n.dart';
import 'package:ente_auth/theme/ente_theme.dart';
import 'package:ente_auth/ui/settings/data/import_page.dart';
-import 'package:ente_auth/ui/settings/faq.dart';
import 'package:ente_auth/utils/navigation_util.dart';
import 'package:ente_auth/utils/platform_util.dart';
import 'package:flutter/material.dart';
+import 'package:logging/logging.dart';
class HomeEmptyStateWidget extends StatelessWidget {
final VoidCallback? onScanTap;
@@ -73,15 +73,16 @@ class HomeEmptyStateWidget extends StatelessWidget {
const SizedBox(height: 18),
InkWell(
onTap: () {
- showModalBottomSheet<void>(
- backgroundColor:
- Theme.of(context).colorScheme.surface,
- barrierColor: Colors.black87,
- context: context,
- builder: (context) {
- return const FAQQuestionsWidget();
- },
- );
+ try {
+ PlatformUtil.openWebView(
+ context,
+ context.l10n.faq,
+ "https://help.ente.io/auth/faq",
+ );
+ } catch (e) {
+ Logger("HomeEmptyStateWidget")
+ .severe("Failed to open FAQ", e);
+ }
},
child: Text(
l10n.faq,
diff --git a/auth/lib/ui/settings/support_section_widget.dart b/auth/lib/ui/settings/support_section_widget.dart
index 057c5dd389..720096dda2 100644
--- a/auth/lib/ui/settings/support_section_widget.dart
+++ b/auth/lib/ui/settings/support_section_widget.dart
@@ -5,8 +5,8 @@ import 'package:ente_auth/ui/components/captioned_text_widget.dart';
import 'package:ente_auth/ui/components/expandable_menu_item_widget.dart';
import 'package:ente_auth/ui/components/menu_item_widget.dart';
import 'package:ente_auth/ui/settings/common_settings.dart';
-import 'package:ente_auth/ui/settings/faq.dart';
import 'package:ente_auth/utils/email_util.dart';
+import 'package:ente_auth/utils/platform_util.dart';
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:url_launcher/url_launcher_string.dart';
@@ -42,15 +42,15 @@ class _SupportSectionWidgetState extends State<SupportSectionWidget> {
trailingIcon: Icons.chevron_right_outlined,
trailingIconIsMuted: true,
onTap: () async {
- // ignore: unawaited_futures
- showModalBottomSheet<void>(
- backgroundColor: Theme.of(context).colorScheme.surface,
- barrierColor: Colors.black87,
- context: context,
- builder: (context) {
- return const FAQQuestionsWidget();
- },
- );
+ try {
+ PlatformUtil.openWebView(
+ context,
+ context.l10n.faq,
+ "https://help.ente.io/auth/faq",
+ );
+ } catch (e) {
+ Logger("SupportSection").severe("Failed to open FAQ", e);
+ }
},
),
sectionOptionSpacing,