TF-3427 Remove print action in composer in mobile browser app
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -47,7 +47,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
|||||||
openRichToolbarAction: controller.richTextWebController!.toggleFormattingOptions,
|
openRichToolbarAction: controller.richTextWebController!.toggleFormattingOptions,
|
||||||
isSendButtonEnabled: controller.isEnableEmailSendButton.value,
|
isSendButtonEnabled: controller.isEnableEmailSendButton.value,
|
||||||
hasRequestReadReceipt: controller.hasRequestReadReceipt.value,
|
hasRequestReadReceipt: controller.hasRequestReadReceipt.value,
|
||||||
isPrintDraftEnabled: controller.isEmailChanged.value,
|
isEmailChanged: controller.isEmailChanged.value,
|
||||||
menuMoreOptionController: controller.menuMoreOptionController!,
|
menuMoreOptionController: controller.menuMoreOptionController!,
|
||||||
onCloseViewAction: () => controller.handleClickCloseComposer(context),
|
onCloseViewAction: () => controller.handleClickCloseComposer(context),
|
||||||
attachFileAction: () => controller.openFilePickerByType(context, FileType.any),
|
attachFileAction: () => controller.openFilePickerByType(context, FileType.any),
|
||||||
@@ -518,7 +518,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
|||||||
deleteComposerAction: () => controller.handleClickDeleteComposer(context),
|
deleteComposerAction: () => controller.handleClickDeleteComposer(context),
|
||||||
saveToDraftAction: () => controller.handleClickSaveAsDraftsButton(context),
|
saveToDraftAction: () => controller.handleClickSaveAsDraftsButton(context),
|
||||||
sendMessageAction: () => controller.handleClickSendButton(context),
|
sendMessageAction: () => controller.handleClickSendButton(context),
|
||||||
isPrintDraftEnabled: controller.isEmailChanged.isTrue,
|
isEmailChanged: controller.isEmailChanged.isTrue,
|
||||||
toggleCodeViewAction: controller.richTextWebController!.toggleCodeView,
|
toggleCodeViewAction: controller.richTextWebController!.toggleCodeView,
|
||||||
menuMoreOptionController: controller.menuMoreOptionController!,
|
menuMoreOptionController: controller.menuMoreOptionController!,
|
||||||
printDraftAction: () => controller.printDraft(context),
|
printDraftAction: () => controller.printDraft(context),
|
||||||
@@ -801,7 +801,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
|||||||
deleteComposerAction: () => controller.handleClickDeleteComposer(context),
|
deleteComposerAction: () => controller.handleClickDeleteComposer(context),
|
||||||
saveToDraftAction: () => controller.handleClickSaveAsDraftsButton(context),
|
saveToDraftAction: () => controller.handleClickSaveAsDraftsButton(context),
|
||||||
sendMessageAction: () => controller.handleClickSendButton(context),
|
sendMessageAction: () => controller.handleClickSendButton(context),
|
||||||
isPrintDraftEnabled: controller.isEmailChanged.isTrue,
|
isEmailChanged: controller.isEmailChanged.isTrue,
|
||||||
toggleCodeViewAction: controller.richTextWebController!.toggleCodeView,
|
toggleCodeViewAction: controller.richTextWebController!.toggleCodeView,
|
||||||
menuMoreOptionController: controller.menuMoreOptionController!,
|
menuMoreOptionController: controller.menuMoreOptionController!,
|
||||||
printDraftAction: () => controller.printDraft(context),
|
printDraftAction: () => controller.printDraft(context),
|
||||||
|
|||||||
@@ -94,9 +94,15 @@ extension ComposerPrintDraftExtension on ComposerController {
|
|||||||
bccPrefix: appLocalizations.bcc_email_address_prefix,
|
bccPrefix: appLocalizations.bcc_email_address_prefix,
|
||||||
replyToPrefix: appLocalizations.replyToEmailAddressPrefix,
|
replyToPrefix: appLocalizations.replyToEmailAddressPrefix,
|
||||||
titleAttachment: appLocalizations.attachments.toLowerCase(),
|
titleAttachment: appLocalizations.attachments.toLowerCase(),
|
||||||
toAddress: listToEmailAddress.toSet().toEscapeHtmlStringUseCommaSeparator(),
|
toAddress: listToEmailAddress.toSet().listEmailAddressToString(
|
||||||
ccAddress: listCcEmailAddress.toSet().toEscapeHtmlStringUseCommaSeparator(),
|
isFullEmailAddress: true,
|
||||||
bccAddress: listBccEmailAddress.toSet().toEscapeHtmlStringUseCommaSeparator(),
|
),
|
||||||
|
ccAddress: listCcEmailAddress.toSet().listEmailAddressToString(
|
||||||
|
isFullEmailAddress: true,
|
||||||
|
),
|
||||||
|
bccAddress: listBccEmailAddress.toSet().listEmailAddressToString(
|
||||||
|
isFullEmailAddress: true,
|
||||||
|
),
|
||||||
sender: identitySelected.value?.toEmailAddress(),
|
sender: identitySelected.value?.toEmailAddress(),
|
||||||
receiveTime: receiveTime,
|
receiveTime: receiveTime,
|
||||||
subject: subjectEmail.value ?? '',
|
subject: subjectEmail.value ?? '',
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:core/presentation/resources/image_paths.dart';
|
import 'package:core/presentation/resources/image_paths.dart';
|
||||||
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||||
|
import 'package:core/utils/platform_info.dart';
|
||||||
import 'package:custom_pop_up_menu/custom_pop_up_menu.dart';
|
import 'package:custom_pop_up_menu/custom_pop_up_menu.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:tmail_ui_user/features/base/widget/highlight_svg_icon_on_hover.dart';
|
import 'package:tmail_ui_user/features/base/widget/highlight_svg_icon_on_hover.dart';
|
||||||
@@ -12,7 +13,7 @@ class BottomBarComposerWidget extends StatelessWidget {
|
|||||||
|
|
||||||
final ImagePaths imagePaths;
|
final ImagePaths imagePaths;
|
||||||
final bool isCodeViewEnabled;
|
final bool isCodeViewEnabled;
|
||||||
final bool isPrintDraftEnabled;
|
final bool isEmailChanged;
|
||||||
final bool isFormattingOptionsEnabled;
|
final bool isFormattingOptionsEnabled;
|
||||||
final bool hasReadReceipt;
|
final bool hasReadReceipt;
|
||||||
final CustomPopupMenuController menuMoreOptionController;
|
final CustomPopupMenuController menuMoreOptionController;
|
||||||
@@ -30,7 +31,7 @@ class BottomBarComposerWidget extends StatelessWidget {
|
|||||||
super.key,
|
super.key,
|
||||||
required this.imagePaths,
|
required this.imagePaths,
|
||||||
required this.isCodeViewEnabled,
|
required this.isCodeViewEnabled,
|
||||||
required this.isPrintDraftEnabled,
|
required this.isEmailChanged,
|
||||||
required this.isFormattingOptionsEnabled,
|
required this.isFormattingOptionsEnabled,
|
||||||
required this.hasReadReceipt,
|
required this.hasReadReceipt,
|
||||||
required this.menuMoreOptionController,
|
required this.menuMoreOptionController,
|
||||||
@@ -128,7 +129,7 @@ class BottomBarComposerWidget extends StatelessWidget {
|
|||||||
toggleRequestReadReceiptAction();
|
toggleRequestReadReceiptAction();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
if (isPrintDraftEnabled)
|
if (_isPrintEnabled)
|
||||||
PopupItemWidget(
|
PopupItemWidget(
|
||||||
imagePaths.icPrinter,
|
imagePaths.icPrinter,
|
||||||
AppLocalizations.of(context).print,
|
AppLocalizations.of(context).print,
|
||||||
@@ -183,4 +184,7 @@ class BottomBarComposerWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get _isPrintEnabled =>
|
||||||
|
isEmailChanged && PlatformInfo.isWeb && PlatformInfo.isCanvasKit;
|
||||||
}
|
}
|
||||||
+7
-3
@@ -1,5 +1,6 @@
|
|||||||
import 'package:core/presentation/resources/image_paths.dart';
|
import 'package:core/presentation/resources/image_paths.dart';
|
||||||
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||||
|
import 'package:core/utils/platform_info.dart';
|
||||||
import 'package:custom_pop_up_menu/custom_pop_up_menu.dart';
|
import 'package:custom_pop_up_menu/custom_pop_up_menu.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:tmail_ui_user/features/base/widget/highlight_svg_icon_on_hover.dart';
|
import 'package:tmail_ui_user/features/base/widget/highlight_svg_icon_on_hover.dart';
|
||||||
@@ -15,7 +16,7 @@ class MobileResponsiveAppBarComposerWidget extends StatelessWidget {
|
|||||||
final bool isSendButtonEnabled;
|
final bool isSendButtonEnabled;
|
||||||
final bool isFormattingOptionsEnabled;
|
final bool isFormattingOptionsEnabled;
|
||||||
final bool hasRequestReadReceipt;
|
final bool hasRequestReadReceipt;
|
||||||
final bool isPrintDraftEnabled;
|
final bool isEmailChanged;
|
||||||
final CustomPopupMenuController menuMoreOptionController;
|
final CustomPopupMenuController menuMoreOptionController;
|
||||||
final VoidCallback onCloseViewAction;
|
final VoidCallback onCloseViewAction;
|
||||||
final VoidCallback attachFileAction;
|
final VoidCallback attachFileAction;
|
||||||
@@ -35,7 +36,7 @@ class MobileResponsiveAppBarComposerWidget extends StatelessWidget {
|
|||||||
required this.isFormattingOptionsEnabled,
|
required this.isFormattingOptionsEnabled,
|
||||||
required this.isSendButtonEnabled,
|
required this.isSendButtonEnabled,
|
||||||
required this.hasRequestReadReceipt,
|
required this.hasRequestReadReceipt,
|
||||||
required this.isPrintDraftEnabled,
|
required this.isEmailChanged,
|
||||||
required this.menuMoreOptionController,
|
required this.menuMoreOptionController,
|
||||||
required this.openRichToolbarAction,
|
required this.openRichToolbarAction,
|
||||||
required this.onCloseViewAction,
|
required this.onCloseViewAction,
|
||||||
@@ -145,7 +146,7 @@ class MobileResponsiveAppBarComposerWidget extends StatelessWidget {
|
|||||||
toggleRequestReadReceiptAction();
|
toggleRequestReadReceiptAction();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
if (isPrintDraftEnabled)
|
if (_isPrintEnabled)
|
||||||
PopupItemWidget(
|
PopupItemWidget(
|
||||||
imagePaths.icPrinter,
|
imagePaths.icPrinter,
|
||||||
AppLocalizations.of(context).print,
|
AppLocalizations.of(context).print,
|
||||||
@@ -187,4 +188,7 @@ class MobileResponsiveAppBarComposerWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get _isPrintEnabled =>
|
||||||
|
isEmailChanged && PlatformInfo.isWeb && PlatformInfo.isCanvasKit;
|
||||||
}
|
}
|
||||||
@@ -4321,6 +4321,7 @@ class AppLocalizations {
|
|||||||
name: 'downloadAttachmentInEMLPreviewWarningMessage',
|
name: 'downloadAttachmentInEMLPreviewWarningMessage',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String get editAsNewEmail {
|
String get editAsNewEmail {
|
||||||
return Intl.message(
|
return Intl.message(
|
||||||
'Edit as new email',
|
'Edit as new email',
|
||||||
|
|||||||
Reference in New Issue
Block a user