π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix(auth/support): remove support email and redirect to github discussions
Prateek Sunal986c00f4e8e8
diff --git a/auth/android/app/src/main/play/listings/en-US/full_description.txt b/auth/android/app/src/main/play/listings/en-US/full_description.txtindex 0bfee84fa5..571ef641a2 100644--- a/auth/android/app/src/main/play/listings/en-US/full_description.txt+++ b/auth/android/app/src/main/play/listings/en-US/full_description.txt@@ -36,5 +36,5 @@ file, that adheres to the above format.SUPPORT-If you need help, please reach out to [email protected], and a human will get in touch with you.+If you need help, please visit @ https://github.com/ente-io/ente/discussions/new?category=q-a, and someone will get in touch with you.If you have feature requests, please create an issue @ https://github.com/ente-io/entediff --git a/auth/fastlane/metadata/android/en-US/full_description.txt b/auth/fastlane/metadata/android/en-US/full_description.txtindex f3664176dc..54c4a53525 100644--- a/auth/fastlane/metadata/android/en-US/full_description.txt+++ b/auth/fastlane/metadata/android/en-US/full_description.txt@@ -36,5 +36,5 @@ file, that adheres to the above format.SUPPORT-If you need help, please reach out to [email protected], and a human will get in touch with you.+If you need help, please visit @ https://github.com/ente-io/ente/discussions/new?category=q-a, and someone will get in touch with you.If you have feature requests, please create an issue @ https://github.com/ente-io/entediff --git a/auth/lib/core/constants.dart b/auth/lib/core/constants.dartindex 5685220ac3..d7db33728f 100644--- a/auth/lib/core/constants.dart+++ b/auth/lib/core/constants.dart@@ -32,8 +32,6 @@ const mnemonicKeyWordCount = 24;// https://stackoverflow.com/a/61162219const dragSensitivity = 8;-const supportEmail = '[email protected]';-// Default values for various feature flagsclass FFDefault {static const bool enableStripe = true;diff --git a/auth/lib/l10n/arb/app_en.arb b/auth/lib/l10n/arb/app_en.arbindex 94698bf0b2..00d64cdec3 100644--- a/auth/lib/l10n/arb/app_en.arb+++ b/auth/lib/l10n/arb/app_en.arb@@ -465,5 +465,6 @@"appLockDescription": "Choose between your device's default lock screen and a custom lock screen with a PIN or password.","pinLock": "Pin lock","enterPin": "Enter PIN",- "setNewPin": "Set new PIN"+ "setNewPin": "Set new PIN",+ "importFailureDescNew": "Could not parse the selected file."}\ No newline at end of filediff --git a/auth/lib/ui/account/login_pwd_verification_page.dart b/auth/lib/ui/account/login_pwd_verification_page.dartindex 2d2754ec16..d5ae7a3dbc 100644--- a/auth/lib/ui/account/login_pwd_verification_page.dart+++ b/auth/lib/ui/account/login_pwd_verification_page.dart@@ -182,7 +182,6 @@ class _LoginPasswordVerificationPageStateawait sendLogs(context,context.l10n.contactSupport,- "[email protected]",postShare: () {},);}diff --git a/auth/lib/ui/account/password_reentry_page.dart b/auth/lib/ui/account/password_reentry_page.dartindex 261f41db50..600d6ada98 100644--- a/auth/lib/ui/account/password_reentry_page.dart+++ b/auth/lib/ui/account/password_reentry_page.dart@@ -140,7 +140,6 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {await sendLogs(context,context.l10n.contactSupport,- "[email protected]",postShare: () {},);}diff --git a/auth/lib/ui/code_error_widget.dart b/auth/lib/ui/code_error_widget.dartindex 41250177c1..701bd576fe 100644--- a/auth/lib/ui/code_error_widget.dart+++ b/auth/lib/ui/code_error_widget.dart@@ -5,7 +5,7 @@ import 'package:ente_auth/theme/ente_theme.dart';import 'package:ente_auth/ui/common/gradient_button.dart';import 'package:ente_auth/ui/linear_progress_widget.dart';import 'package:ente_auth/ui/tools/debug/raw_codes_viewer.dart';-import 'package:ente_auth/utils/dialog_util.dart';+import 'package:ente_auth/utils/email_util.dart';import 'package:flutter/material.dart';class CodeErrorWidget extends StatelessWidget {@@ -114,12 +114,7 @@ class CodeErrorWidget extends StatelessWidget {text: context.l10n.contactSupport,fontSize: 10,onTap: () async {- await showErrorDialog(- context,- context.l10n.contactSupport,- context.l10n- .contactSupportViaEmailMessage("[email protected]"),- );+ await openSupportPage(null, null);},borderWidth: 0.6,borderRadius: 6,diff --git a/auth/lib/ui/common/report_bug.dart b/auth/lib/ui/common/report_bug.dartindex 7b41cf0eb9..ad3daf53a6 100644--- a/auth/lib/ui/common/report_bug.dart+++ b/auth/lib/ui/common/report_bug.dart@@ -22,7 +22,6 @@ PopupMenuButton<dynamic> reportBugPopupMenu(BuildContext context) {await sendLogs(context,"Contact support",- "[email protected]",postShare: () {},);}diff --git a/auth/lib/ui/settings/data/import/aegis_import.dart b/auth/lib/ui/settings/data/import/aegis_import.dartindex 471ce943ce..cb5adb8d07 100644--- a/auth/lib/ui/settings/data/import/aegis_import.dart+++ b/auth/lib/ui/settings/data/import/aegis_import.dart@@ -77,7 +77,7 @@ Future<void> _pickAegisJsonFile(BuildContext context) async {await showErrorDialog(context,context.l10n.sorry,- "${context.l10n.importFailureDesc}\n Error: ${e.toString()}",+ "${context.l10n.importFailureDescNew}\n Error: ${e.toString()}",);}}diff --git a/auth/lib/ui/settings/data/import/bitwarden_import.dart b/auth/lib/ui/settings/data/import/bitwarden_import.dartindex eec93dbdb4..56106df39e 100644--- a/auth/lib/ui/settings/data/import/bitwarden_import.dart+++ b/auth/lib/ui/settings/data/import/bitwarden_import.dart@@ -68,7 +68,7 @@ Future<void> _pickBitwardenJsonFile(BuildContext context) async {await showErrorDialog(context,context.l10n.sorry,- "${context.l10n.importFailureDesc}\n Error: ${e.toString()}",+ "${context.l10n.importFailureDescNew}\n Error: ${e.toString()}",);}}diff --git a/auth/lib/ui/settings/data/import/encrypted_ente_import.dart b/auth/lib/ui/settings/data/import/encrypted_ente_import.dartindex 3d7896f88e..4b055d2cf9 100644--- a/auth/lib/ui/settings/data/import/encrypted_ente_import.dart+++ b/auth/lib/ui/settings/data/import/encrypted_ente_import.dart@@ -150,7 +150,7 @@ Future<void> _pickEnteJsonFile(BuildContext context) async {await showErrorDialog(context,context.l10n.sorry,- context.l10n.importFailureDesc,+ context.l10n.importFailureDescNew,);}}diff --git a/auth/lib/ui/settings/data/import/lastpass_import.dart b/auth/lib/ui/settings/data/import/lastpass_import.dartindex 550f2af7e0..db30286299 100644--- a/auth/lib/ui/settings/data/import/lastpass_import.dart+++ b/auth/lib/ui/settings/data/import/lastpass_import.dart@@ -67,7 +67,7 @@ Future<void> _pickLastpassJsonFile(BuildContext context) async {await showErrorDialog(context,context.l10n.sorry,- "${context.l10n.importFailureDesc}\n Error: ${e.toString()}",+ "${context.l10n.importFailureDescNew}\n Error: ${e.toString()}",);}}diff --git a/auth/lib/ui/settings/data/import/plain_text_import.dart b/auth/lib/ui/settings/data/import/plain_text_import.dartindex 6867584b0f..486813ed90 100644--- a/auth/lib/ui/settings/data/import/plain_text_import.dart+++ b/auth/lib/ui/settings/data/import/plain_text_import.dart@@ -144,7 +144,7 @@ Future<void> _pickImportFile(BuildContext context) async {await showErrorDialog(context,context.l10n.sorry,- context.l10n.importFailureDesc,+ context.l10n.importFailureDescNew,);}}diff --git a/auth/lib/ui/settings/data/import/raivo_plain_text_import.dart b/auth/lib/ui/settings/data/import/raivo_plain_text_import.dartindex 1b00086fe7..547145f815 100644--- a/auth/lib/ui/settings/data/import/raivo_plain_text_import.dart+++ b/auth/lib/ui/settings/data/import/raivo_plain_text_import.dart@@ -67,7 +67,7 @@ Future<void> _pickRaivoJsonFile(BuildContext context) async {await showErrorDialog(context,context.l10n.sorry,- "${context.l10n.importFailureDesc}\n Error: ${e.toString()}",+ "${context.l10n.importFailureDescNew}\n Error: ${e.toString()}",);}}diff --git a/auth/lib/ui/settings/data/import/two_fas_import.dart b/auth/lib/ui/settings/data/import/two_fas_import.dartindex dcec016d49..fa4ec5aede 100644--- a/auth/lib/ui/settings/data/import/two_fas_import.dart+++ b/auth/lib/ui/settings/data/import/two_fas_import.dart@@ -72,7 +72,7 @@ Future<void> _pick2FasFile(BuildContext context) async {await showErrorDialog(context,context.l10n.sorry,- "${context.l10n.importFailureDesc}\n Error: ${e.toString()}",+ "${context.l10n.importFailureDescNew}\n Error: ${e.toString()}",);}}diff --git a/auth/lib/ui/settings/support_section_widget.dart b/auth/lib/ui/settings/support_section_widget.dartindex 1343d23476..b445748650 100644--- a/auth/lib/ui/settings/support_section_widget.dart+++ b/auth/lib/ui/settings/support_section_widget.dart@@ -70,18 +70,18 @@ class _SupportSectionWidgetState extends State<SupportSectionWidget> {},),sectionOptionSpacing,- MenuItemWidget(- captionedTextWidget: CaptionedTextWidget(- title: l10n.email,- ),- pressedColor: getEnteColorScheme(context).fillFaint,- trailingIcon: Icons.chevron_right_outlined,- trailingIconIsMuted: true,- onTap: () async {- await sendEmail(context, to: supportEmail);- },- ),- sectionOptionSpacing,+ // MenuItemWidget(+ // captionedTextWidget: CaptionedTextWidget(+ // title: l10n.email,+ // ),+ // pressedColor: getEnteColorScheme(context).fillFaint,+ // trailingIcon: Icons.chevron_right_outlined,+ // trailingIconIsMuted: true,+ // onTap: () async {+ // await sendEmail(context, to: supportEmail);+ // },+ // ),+ // sectionOptionSpacing,MenuItemWidget(captionedTextWidget: CaptionedTextWidget(title: l10n.reportABug,@@ -90,7 +90,7 @@ class _SupportSectionWidgetState extends State<SupportSectionWidget> {trailingIcon: Icons.chevron_right_outlined,trailingIconIsMuted: true,onTap: () async {- await sendLogs(context, l10n.reportBug, "[email protected]");+ await sendLogs(context, l10n.reportBug);},onDoubleTap: () async {try {diff --git a/auth/lib/ui/two_factor_recovery_page.dart b/auth/lib/ui/two_factor_recovery_page.dartindex 5743f0246f..c458c001e5 100644--- a/auth/lib/ui/two_factor_recovery_page.dart+++ b/auth/lib/ui/two_factor_recovery_page.dart@@ -1,7 +1,7 @@import 'package:ente_auth/l10n/l10n.dart';import 'package:ente_auth/models/account/two_factor.dart';import 'package:ente_auth/services/user_service.dart';-import 'package:ente_auth/utils/dialog_util.dart';+import 'package:ente_auth/utils/email_util.dart';import 'package:flutter/material.dart';class TwoFactorRecoveryPage extends StatefulWidget {@@ -86,12 +86,8 @@ class _TwoFactorRecoveryPageState extends State<TwoFactorRecoveryPage> {),GestureDetector(behavior: HitTestBehavior.translucent,- onTap: () {- showErrorDialog(- context,- l10n.contactSupport,- l10n.contactSupportViaEmailMessage("[email protected]"),- );+ onTap: () async {+ await openSupportPage(null, null);},child: Container(padding: const EdgeInsets.all(40),diff --git a/auth/lib/utils/dialog_util.dart b/auth/lib/utils/dialog_util.dartindex 24636bf889..158db3dec1 100644--- a/auth/lib/utils/dialog_util.dart+++ b/auth/lib/utils/dialog_util.dart@@ -31,12 +31,21 @@ Future<ButtonResult?> showErrorDialog(title: title,body: body,isDismissible: isDismissable,- buttons: const [+ buttons: [ButtonWidget(+ buttonType: ButtonType.primary,+ labelText: context.l10n.contactSupport,+ isInAlert: true,+ buttonAction: ButtonAction.first,+ onTap: () async {+ await openSupportPage(body, null);+ },+ ),+ const ButtonWidget(buttonType: ButtonType.secondary,labelText: "OK",isInAlert: true,- buttonAction: ButtonAction.first,+ buttonAction: ButtonAction.second,),],);@@ -158,7 +167,6 @@ Future<ButtonResult?> showGenericErrorDialog({await sendLogs(context,context.l10n.contactSupport,- "[email protected]",postShare: () {},);},diff --git a/auth/lib/utils/email_util.dart b/auth/lib/utils/email_util.dartindex 8b04122289..73291a1ed5 100644--- a/auth/lib/utils/email_util.dart+++ b/auth/lib/utils/email_util.dart@@ -16,7 +16,6 @@ import 'package:ente_auth/utils/toast_util.dart';import "package:file_saver/file_saver.dart";import 'package:flutter/material.dart';import 'package:flutter/services.dart';-import 'package:flutter_email_sender/flutter_email_sender.dart';import "package:intl/intl.dart";import 'package:logging/logging.dart';import 'package:package_info_plus/package_info_plus.dart';@@ -35,8 +34,7 @@ bool isValidEmail(String? email) {Future<void> sendLogs(BuildContext context,- String title,- String toEmail, {+ String title, {Function? postShare,String? subject,String? body,@@ -55,7 +53,7 @@ Future<void> sendLogs(buttonAction: ButtonAction.first,shouldSurfaceExecutionStates: false,onTap: () async {- await _sendLogs(context, toEmail, subject, body);+ await openSupportPage(subject, body);if (postShare != null) {postShare();}@@ -111,27 +109,35 @@ Future<void> sendLogs();}-Future<void> _sendLogs(- BuildContext context,- String toEmail,+Future<void> openSupportPage(String? subject,String? body,) async {- final String zipFilePath = await getZippedLogsFile(context);- final Email email = Email(- recipients: [toEmail],- subject: subject ?? '',- body: body ?? '',- attachmentPaths: [zipFilePath],- isHTML: false,- );- try {- await FlutterEmailSender.send(email);- } catch (e, s) {- _logger.severe('email sender failed', e, s);- Navigator.of(context, rootNavigator: true).pop();- await shareLogs(context, toEmail, zipFilePath);+ const url = "https://github.com/ente-io/ente/discussions/new?category=q-a";+ if (subject != null && body != null) {+ await launchUrl(+ Uri.parse(+ "$url&title=$subject&body=$body",+ ),+ );+ } else {+ await launchUrl(Uri.parse(url));}+ // final String zipFilePath = await getZippedLogsFile(context);+ // final Email email = Email(+ // recipients: [toEmail],+ // subject: subject ?? '',+ // body: body ?? '',+ // attachmentPaths: [zipFilePath],+ // isHTML: false,+ // );+ // try {+ // await FlutterEmailSender.send(email);+ // } catch (e, s) {+ // _logger.severe('email sender failed', e, s);+ // Navigator.of(context, rootNavigator: true).pop();+ // await shareLogs(context, toEmail, zipFilePath);+ // }}Future<String> getZippedLogsFile(BuildContext context) async {