Hot fix update new UI for confirm dialog

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-03-13 16:34:23 +07:00
committed by Dat H. Pham
parent 86fa566a21
commit ae0c847960
15 changed files with 117 additions and 29 deletions
@@ -444,6 +444,10 @@ abstract class BaseMailboxController extends BaseController {
textContent: AppLocalizations.of(context).message_confirmation_dialog_delete_folder(presentationMailbox.getDisplayName(context)),
confirmText: AppLocalizations.of(context).delete,
cancelText: AppLocalizations.of(context).cancel,
cancelBackgroundButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
confirmBackgroundButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
onConfirmButtonAction: () => onDeleteMailboxAction(presentationMailbox),
onCancelButtonAction: popBack,
onCloseButtonAction: popBack,
@@ -86,6 +86,10 @@ mixin MailboxActionHandlerMixin {
confirmText: AppLocalizations.of(context).delete,
cancelText: AppLocalizations.of(context).cancel,
useIconAsBasicLogo: true,
cancelBackgroundButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
confirmBackgroundButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
onCloseButtonAction: popBack,
onConfirmButtonAction: () {
popBack();
@@ -149,6 +153,10 @@ mixin MailboxActionHandlerMixin {
confirmText: AppLocalizations.of(context).delete_all,
cancelText: AppLocalizations.of(context).cancel,
useIconAsBasicLogo: true,
cancelBackgroundButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
confirmBackgroundButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
onCloseButtonAction: popBack,
onConfirmButtonAction: () {
popBack();
@@ -38,6 +38,8 @@ mixin MessageDialogActionMixin {
TextStyle? cancelStyle,
Color? actionButtonColor,
Color? cancelButtonColor,
Color? cancelLabelButtonColor,
Color? confirmLabelButtonColor,
EdgeInsetsGeometry? marginIcon,
EdgeInsetsGeometry? paddingButton,
PopInvokedWithResultCallback? onPopInvoked,
@@ -63,8 +65,10 @@ mixin MessageDialogActionMixin {
confirmText: actionName,
cancelText: hasCancelButton ? cancelTitle ?? AppLocalizations.of(context).cancel : '',
iconWidget: icon,
colorCancelButton: cancelButtonColor,
colorConfirmButton: actionButtonColor,
cancelBackgroundButtonColor: cancelButtonColor,
confirmBackgroundButtonColor: actionButtonColor,
cancelLabelButtonColor: cancelLabelButtonColor,
confirmLabelButtonColor: confirmLabelButtonColor,
styleTextCancelButton: cancelStyle,
styleTextConfirmButton: actionStyle,
styleTitle: titleStyle,
@@ -108,8 +112,10 @@ mixin MessageDialogActionMixin {
title: title ?? '',
iconWidget: icon,
widthDialog: responsiveUtils.getSizeScreenWidth(context),
colorConfirmButton: actionButtonColor,
colorCancelButton: cancelButtonColor,
confirmBackgroundButtonColor: actionButtonColor,
cancelBackgroundButtonColor: cancelButtonColor,
cancelLabelButtonColor: cancelLabelButtonColor,
confirmLabelButtonColor: confirmLabelButtonColor,
styleContent: messageStyle,
styleTitle: titleStyle,
styleTextCancelButton: cancelStyle,
@@ -179,8 +185,10 @@ mixin MessageDialogActionMixin {
title: title ?? '',
textContent: message,
iconWidget: icon,
colorConfirmButton: actionButtonColor,
colorCancelButton: cancelButtonColor,
confirmBackgroundButtonColor: actionButtonColor,
cancelBackgroundButtonColor: cancelButtonColor,
cancelLabelButtonColor: cancelLabelButtonColor,
confirmLabelButtonColor: confirmLabelButtonColor,
styleContent: messageStyle,
styleTitle: titleStyle,
styleTextCancelButton: cancelStyle,
@@ -1007,6 +1007,10 @@ class ComposerController extends BaseController
onCancelAction: popBack,
autoPerformPopBack: false,
title: AppLocalizations.of(context).empty_subject,
cancelButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
actionButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
showAsBottomSheet: true,
icon: SvgPicture.asset(imagePaths.icEmpty, fit: BoxFit.fill),
).whenComplete(() => _sendButtonState = ButtonState.enabled);
@@ -1500,6 +1500,10 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
textContent: DeleteActionType.single.getContentDialog(context),
confirmText: DeleteActionType.single.getConfirmActionName(context),
cancelText: AppLocalizations.of(context).cancel,
cancelBackgroundButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
confirmBackgroundButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
onConfirmButtonAction: () => _deleteEmailPermanentlyAction(context, email),
onCancelButtonAction: popBack,
onCloseButtonAction: popBack,
@@ -1074,6 +1074,10 @@ class MailboxController extends BaseMailboxController
imagePath: imagePaths,
useIconAsBasicLogo: true,
title: AppLocalizations.of(context).deleteFolders,
cancelBackgroundButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
confirmBackgroundButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
textContent: AppLocalizations.of(context).messageConfirmationDialogDeleteMultipleFolder(selectedMailboxList.length),
onConfirmButtonAction: () => _deleteMultipleMailboxAction(selectedMailboxList),
onCancelButtonAction: popBack,
@@ -1564,6 +1564,10 @@ class MailboxDashBoardController extends ReloadableController
),
confirmText: actionType.getConfirmActionName(context),
cancelText: AppLocalizations.of(context).cancel,
cancelBackgroundButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
confirmBackgroundButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
onConfirmButtonAction: () => _deleteSelectionEmailsPermanentlyAction(
actionType,
listEmails: listEmails,
@@ -2704,6 +2708,10 @@ class MailboxDashBoardController extends ReloadableController
textContent: AppLocalizations.of(context).emptySpamMessageDialog,
confirmText: AppLocalizations.of(context).delete_all,
cancelText: AppLocalizations.of(context).cancel,
cancelBackgroundButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
confirmBackgroundButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
onConfirmButtonAction: () {
popBack();
if (spamMailbox.countTotalEmails > 0) {
@@ -175,6 +175,10 @@ class EmailRulesController extends BaseController {
textContent: AppLocalizations.of(context).messageConfirmationDialogDeleteEmailRule(emailRule.name),
confirmText: AppLocalizations.of(context).delete,
cancelText: AppLocalizations.of(context).cancel,
cancelBackgroundButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
confirmBackgroundButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
onConfirmButtonAction: () => _handleDeleteEmailRuleAction(emailRule),
onCancelButtonAction: popBack,
onCloseButtonAction: popBack,
@@ -1,3 +1,4 @@
import 'package:core/presentation/extensions/color_extension.dart';
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
import 'package:core/presentation/utils/keyboard_utils.dart';
@@ -122,6 +123,10 @@ class ForwardController extends BaseController {
onConfirmAction: () => _handleDeleteRecipientAction({emailAddress}),
showAsBottomSheet: true,
useIconAsBasicLogo: true,
cancelButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
actionButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
);
}
@@ -204,6 +209,10 @@ class ForwardController extends BaseController {
onConfirmAction: () => _handleDeleteRecipientAction(listEmailAddress),
showAsBottomSheet: true,
useIconAsBasicLogo: true,
cancelButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
actionButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
);
}
@@ -449,6 +449,10 @@ class _AutocompleteContactTextFieldWithTagsState extends State<AutocompleteConta
alignCenter: true,
onConfirmAction: confirmAction,
onCancelAction: cancelAction,
cancelButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
actionButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
icon: SvgPicture.asset(
_imagePaths.icQuotasWarning,
width: 40,
@@ -1,3 +1,4 @@
import 'package:core/presentation/extensions/color_extension.dart';
import 'package:core/presentation/resources/image_paths.dart';
import 'package:core/presentation/utils/responsive_utils.dart';
import 'package:core/presentation/views/dialog/confirmation_dialog_builder.dart';
@@ -63,6 +64,10 @@ class DeleteIdentityDialogBuilder extends StatelessWidget {
alignment: alignment,
outsideDialogPadding: outsideDialogPadding,
widthDialog: widthDialog,
cancelBackgroundButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
confirmBackgroundButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
onConfirmButtonAction: onDeleteIdentityAction,
onCancelButtonAction: popBack,
onCloseButtonAction: popBack,
@@ -245,6 +245,10 @@ mixin EmailActionController {
textContent: DeleteActionType.single.getContentDialog(context),
confirmText: DeleteActionType.single.getConfirmActionName(context),
cancelText: AppLocalizations.of(context).cancel,
cancelBackgroundButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
confirmBackgroundButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
onConfirmButtonAction: () => _deleteEmailPermanentlyAction(context, email),
onCancelButtonAction: popBack,
onCloseButtonAction: popBack,
@@ -388,6 +388,10 @@ class UploadController extends BaseController {
AppLocalizations.of(context).warningMessageWhenExceedGenerallySizeInComposer,
AppLocalizations.of(context).continueAction,
cancelTitle: AppLocalizations.of(context).cancel,
cancelButtonColor: AppColor.blue700,
cancelLabelButtonColor: Colors.white,
actionButtonColor: AppColor.grayBackgroundColor,
confirmLabelButtonColor: AppColor.steelGray600,
alignCenter: true,
onConfirmAction: confirmAction,
icon: SvgPicture.asset(