fix(auth/support): remove support email and redirect to github discussions

This commit is contained in:
Prateek Sunal 2024-08-02 16:36:05 +05:30
parent 5f7b411b67
commit 986c00f4e8
19 changed files with 67 additions and 66 deletions

View File

@ -36,5 +36,5 @@ file, that adheres to the above format.
SUPPORT
If you need help, please reach out to support@ente.io, 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/ente

View File

@ -36,5 +36,5 @@ file, that adheres to the above format.
SUPPORT
If you need help, please reach out to support@ente.io, 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/ente

View File

@ -32,8 +32,6 @@ const mnemonicKeyWordCount = 24;
// https://stackoverflow.com/a/61162219
const dragSensitivity = 8;
const supportEmail = 'support@ente.io';
// Default values for various feature flags
class FFDefault {
static const bool enableStripe = true;

View File

@ -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."
}

View File

@ -182,7 +182,6 @@ class _LoginPasswordVerificationPageState
await sendLogs(
context,
context.l10n.contactSupport,
"auth@ente.io",
postShare: () {},
);
}

View File

@ -140,7 +140,6 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
await sendLogs(
context,
context.l10n.contactSupport,
"support@ente.io",
postShare: () {},
);
}

View File

@ -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("support@ente.io"),
);
await openSupportPage(null, null);
},
borderWidth: 0.6,
borderRadius: 6,

View File

@ -22,7 +22,6 @@ PopupMenuButton<dynamic> reportBugPopupMenu(BuildContext context) {
await sendLogs(
context,
"Contact support",
"support@ente.io",
postShare: () {},
);
}

View File

@ -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()}",
);
}
}

View File

@ -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()}",
);
}
}

View File

@ -150,7 +150,7 @@ Future<void> _pickEnteJsonFile(BuildContext context) async {
await showErrorDialog(
context,
context.l10n.sorry,
context.l10n.importFailureDesc,
context.l10n.importFailureDescNew,
);
}
}

View File

@ -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()}",
);
}
}

View File

@ -144,7 +144,7 @@ Future<void> _pickImportFile(BuildContext context) async {
await showErrorDialog(
context,
context.l10n.sorry,
context.l10n.importFailureDesc,
context.l10n.importFailureDescNew,
);
}
}

View File

@ -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()}",
);
}
}

View File

@ -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()}",
);
}
}

View File

@ -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, "auth@ente.io");
await sendLogs(context, l10n.reportBug);
},
onDoubleTap: () async {
try {

View File

@ -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("support@ente.io"),
);
onTap: () async {
await openSupportPage(null, null);
},
child: Container(
padding: const EdgeInsets.all(40),

View File

@ -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,
"support@ente.io",
postShare: () {},
);
},

View File

@ -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 {