Skip to content

armgit / ente

Public Imported from GitHub
0

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

[auth] Use web for FAQ

Neeraj Gupta48d6c2d008e1
diff --git a/auth/lib/l10n/arb/app_en.arb b/auth/lib/l10n/arb/app_en.arb
index 78f111d6a9..5a82718034 100644
--- a/auth/lib/l10n/arb/app_en.arb
+++ b/auth/lib/l10n/arb/app_en.arb
@@ -141,16 +141,6 @@
"oops": "Oops",
"suggestFeatures": "Suggest features",
"faq": "FAQ",
- "faq_q_1": "How secure is Auth?",
- "faq_a_1": "All codes you backup via Auth is stored end-to-end encrypted. This means only you can access your codes. Our apps are open source and our cryptography has been externally audited.",
- "faq_q_2": "Can I access my codes on desktop?",
- "faq_a_2": "You can access your codes on the web @ auth.ente.io.",
- "faq_q_3": "How can I delete codes?",
- "faq_a_3": "You can delete a code by swiping left on that item.",
- "faq_q_4": "How can I support this project?",
- "faq_a_4": "You can support the development of this project by subscribing to our Photos app @ ente.io.",
- "faq_q_5": "How can I enable FaceID lock in Auth",
- "faq_a_5": "You can enable FaceID lock under Settings β†’ Security β†’ Lockscreen.",
"somethingWentWrongMessage": "Something went wrong, please try again",
"leaveFamily": "Leave family",
"leaveFamilyMessage": "Are you sure that you want to leave the family plan?",
diff --git a/auth/lib/ui/settings/faq.dart b/auth/lib/ui/settings/faq.dart
deleted file mode 100644
index 5f441912eb..0000000000
--- a/auth/lib/ui/settings/faq.dart
+++ /dev/null
@@ -1,124 +0,0 @@
-import 'dart:convert';
-
-import 'package:ente_auth/ente_theme_data.dart';
-import 'package:ente_auth/l10n/l10n.dart';
-import 'package:ente_auth/ui/common/loading_widget.dart';
-import 'package:expansion_tile_card/expansion_tile_card.dart';
-import 'package:flutter/material.dart';
-
-class FAQQuestionsWidget extends StatelessWidget {
- const FAQQuestionsWidget({
- super.key,
- });
-
- @override
- Widget build(BuildContext context) {
- return FutureBuilder<List<FaqItem>>(
- future: Future.value(_getFAQs(context)),
- builder: (BuildContext context, AsyncSnapshot snapshot) {
- if (snapshot.hasData) {
- final faqs = <Widget>[];
- faqs.add(
- Padding(
- padding: const EdgeInsets.all(24),
- child: Text(
- context.l10n.faq,
- style: const TextStyle(
- fontSize: 18,
- fontWeight: FontWeight.bold,
- ),
- ),
- ),
- );
- for (final faq in snapshot.data) {
- faqs.add(FaqWidget(faq: faq));
- }
- faqs.add(
- const Padding(
- padding: EdgeInsets.all(16),
- ),
- );
- return SingleChildScrollView(
- child: Column(
- children: faqs,
- ),
- );
- } else {
- return const EnteLoadingWidget();
- }
- },
- );
- }
-
- List<FaqItem> _getFAQs(BuildContext context) {
- final l01n = context.l10n;
- List<FaqItem> faqs = [];
- faqs.add(FaqItem(q: l01n.faq_q_1, a: l01n.faq_a_1));
- faqs.add(FaqItem(q: l01n.faq_q_2, a: l01n.faq_a_2));
- faqs.add(FaqItem(q: l01n.faq_q_3, a: l01n.faq_a_3));
- faqs.add(FaqItem(q: l01n.faq_q_4, a: l01n.faq_a_4));
- faqs.add(FaqItem(q: l01n.faq_q_5, a: l01n.faq_a_5));
- return faqs;
- }
-}
-
-class FaqWidget extends StatelessWidget {
- const FaqWidget({
- super.key,
- required this.faq,
- });
-
- final FaqItem? faq;
-
- @override
- Widget build(BuildContext context) {
- return Padding(
- padding: const EdgeInsets.all(2),
- child: ExpansionTileCard(
- elevation: 0,
- title: Text(faq!.q),
- expandedTextColor: Theme.of(context).colorScheme.alternativeColor,
- baseColor: Theme.of(context).cardColor,
- children: [
- Align(
- alignment: Alignment.centerLeft,
- child: Padding(
- padding: const EdgeInsets.only(
- left: 16,
- right: 16,
- bottom: 12,
- ),
- child: Text(
- faq!.a,
- style: const TextStyle(
- height: 1.5,
- ),
- ),
- ),
- ),
- ],
- ),
- );
- }
-}
-
-class FaqItem {
- final String q;
- final String a;
-
- FaqItem({
- required this.q,
- required this.a,
- });
-
- factory FaqItem.fromMap(Map<String, dynamic> map) {
- return FaqItem(
- q: map['q'] ?? 'q',
- a: map['a'] ?? 'a',
- );
- }
-
- factory FaqItem.fromJson(String source) =>
- FaqItem.fromMap(json.decode(source));
-
-}