Skip to content

armgit / ente

Public Imported from GitHub
0

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

Add contact support button

Neeraj Gupta1e83ef0c06f5
diff --git a/auth/lib/utils/dialog_util.dart b/auth/lib/utils/dialog_util.dart
index d24608b783..26697f0f7e 100644
--- a/auth/lib/utils/dialog_util.dart
+++ b/auth/lib/utils/dialog_util.dart
@@ -13,6 +13,7 @@ import 'package:ente_auth/ui/components/components_constants.dart';
import 'package:ente_auth/ui/components/dialog_widget.dart';
import 'package:ente_auth/ui/components/models/button_result.dart';
import 'package:ente_auth/ui/components/models/button_type.dart';
+import 'package:ente_auth/utils/email_util.dart';
import 'package:flutter/material.dart';
typedef DialogBuilder = DialogWidget Function(BuildContext context);
@@ -80,12 +81,26 @@ Future<ButtonResult?> showGenericErrorDialog({
icon: Icons.error_outline_outlined,
body: context.l10n.itLooksLikeSomethingWentWrongPleaseRetryAfterSome,
isDismissible: isDismissible,
- buttons: const [
+ buttons: [
ButtonWidget(
- buttonType: ButtonType.secondary,
- labelText: "OK",
+ buttonType: ButtonType.primary,
+ labelText: context.l10n.ok,
+ buttonAction: ButtonAction.first,
isInAlert: true,
),
+ ButtonWidget(
+ buttonType: ButtonType.secondary,
+ labelText: context.l10n.contactSupport,
+ buttonAction: ButtonAction.second,
+ onTap: () async {
+ await sendLogs(
+ context,
+ context.l10n.contactSupport,
+ postShare: () {},
+ );
+ },
+ ),
],
);
}