TF-3410 Update color, dimensions and alignments in EmailView
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.49936 4.91517L9.49939 4.91513L9.49619 4.91251L8.9612 4.47399C8.66129 4.21966 8.38572 4.04346 8.06568 3.93318C7.74668 3.82326 7.39549 3.78301 6.95068 3.78301H4.4458C3.64366 3.78301 2.98502 4.01297 2.52863 4.49842C2.07386 4.98214 1.84502 5.69295 1.84502 6.60352V17.3174C1.84502 18.2547 2.08294 18.9885 2.58821 19.4866C3.09302 19.9841 3.83498 20.217 4.77979 20.217H19.4839C20.3044 20.217 20.9802 19.9778 21.4494 19.4785C21.917 18.9808 22.155 18.2505 22.155 17.3174V8.29102C22.155 7.35748 21.9145 6.62393 21.4085 6.12513C20.9029 5.62676 20.1613 5.39141 19.2202 5.39141H10.7827C10.4979 5.39141 10.2805 5.35791 10.0861 5.28499C9.89158 5.21205 9.70919 5.09562 9.49936 4.91517ZM7.85741 6.02539L7.85797 6.02586L8.3941 6.4741L8.39452 6.47445C8.69093 6.7207 8.96868 6.89429 9.29146 7.00427C9.61293 7.11381 9.96792 7.15645 10.4136 7.15645H19.1938C19.5981 7.15645 19.8906 7.26628 20.0822 7.45704C20.2737 7.64762 20.3899 7.9442 20.3899 8.37012V8.69609H3.61006V6.68262C3.61006 6.27673 3.71634 5.99821 3.89309 5.82058C4.06972 5.64307 4.34362 5.53926 4.73584 5.53926H6.59033C6.86461 5.53926 7.07483 5.57447 7.266 5.6492C7.45818 5.72431 7.64156 5.8434 7.85741 6.02539ZM4.79736 18.452C4.38745 18.452 4.09799 18.3437 3.91036 18.156C3.72276 17.9684 3.61006 17.6746 3.61006 17.2471V10.3732H20.3899V17.2559C20.3899 17.6769 20.274 17.9687 20.0831 18.156C19.8917 18.3438 19.599 18.452 19.1938 18.452H4.79736Z" fill="#99A2AD" stroke="#999FAD" stroke-width="0.35"/>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M7.53764 2.89654C7.36955 2.85619 7.19874 2.85664 7.06309 2.857L7.02663 2.85707L5.54195 2.85707C4.96697 2.85706 4.49242 2.85705 4.10586 2.88864C3.70436 2.92144 3.33529 2.99184 2.98862 3.16848C2.45101 3.4424 2.01392 3.87949 1.74 4.4171C1.56336 4.76377 1.49296 5.13284 1.46016 5.53434C1.42857 5.9209 1.42858 6.39544 1.42859 6.97042V13.0294C1.42858 13.6044 1.42857 14.079 1.46016 14.4655C1.49296 14.867 1.56336 15.2361 1.74 15.5828C2.01392 16.1204 2.45101 16.5575 2.98862 16.8314C3.33528 17.008 3.70436 17.0784 4.10586 17.1112C4.49242 17.1428 4.96696 17.1428 5.54193 17.1428H14.4581C15.0331 17.1428 15.5076 17.1428 15.8942 17.1112C16.2957 17.0784 16.6648 17.008 17.0114 16.8314C17.549 16.5575 17.9861 16.1204 18.26 15.5828C18.4367 15.2361 18.5071 14.867 18.5399 14.4655C18.5715 14.079 18.5715 13.6044 18.5714 13.0294V8.75612C18.5715 8.18115 18.5715 7.70662 18.5399 7.32005C18.5071 6.91855 18.4367 6.54948 18.26 6.20281C17.9861 5.66521 17.549 5.22812 17.0114 4.95419C16.6648 4.77756 16.2957 4.70715 15.8942 4.67435C15.5076 4.64277 15.0331 4.64277 14.4581 4.64278L9.75912 4.64278C9.66555 4.64278 9.61885 4.64261 9.58492 4.64106L9.58236 4.64094L9.58047 4.63922C9.55538 4.61633 9.52224 4.58342 9.45607 4.51726L8.33983 3.40101L8.3141 3.37519C8.21843 3.27901 8.09797 3.15791 7.95058 3.06758C7.82276 2.98926 7.68341 2.93154 7.53764 2.89654ZM7.02663 4.28564C7.1202 4.28564 7.1669 4.28581 7.20083 4.28736L7.20339 4.28749L7.20528 4.28921C7.23037 4.3121 7.26351 4.345 7.32968 4.41117L8.44592 5.52741L8.47165 5.55324C8.56732 5.64941 8.68778 5.77052 8.83517 5.86084C8.96299 5.93917 9.10234 5.99689 9.24811 6.03188C9.4162 6.07224 9.58701 6.07178 9.72266 6.07142L9.75912 6.07136H14.4286C15.0404 6.07136 15.4564 6.07191 15.7778 6.09818C16.091 6.12376 16.2511 6.17014 16.3629 6.22706C16.6317 6.36402 16.8502 6.58257 16.9872 6.85137C17.0441 6.96308 17.0905 7.12323 17.1161 7.43638C17.1262 7.56057 17.1325 7.69885 17.1364 7.85706H2.85716V6.99993C2.85716 6.38808 2.85772 5.97216 2.88398 5.65067C2.90957 5.33751 2.95594 5.17737 3.01287 5.06566C3.14983 4.79685 3.36837 4.57831 3.63717 4.44135C3.74889 4.38443 3.90903 4.33805 4.22219 4.31246C4.54368 4.2862 4.9596 4.28564 5.57145 4.28564H7.02663ZM2.85716 9.28564V12.9999C2.85716 13.6118 2.85772 14.0277 2.88398 14.3492C2.90957 14.6623 2.95594 14.8225 3.01287 14.9342C3.14983 15.203 3.36837 15.4215 3.63717 15.5585C3.74889 15.6154 3.90903 15.6618 4.22219 15.6874C4.54368 15.7137 4.9596 15.7142 5.57145 15.7142H14.4286C15.0404 15.7142 15.4564 15.7137 15.7778 15.6874C16.091 15.6618 16.2511 15.6154 16.3629 15.5585C16.6317 15.4215 16.8502 15.203 16.9872 14.9342C17.0441 14.8225 17.0905 14.6623 17.1161 14.3492C17.1423 14.0277 17.1429 13.6118 17.1429 12.9999V9.28564H2.85716Z"
|
||||
fill="#99A2AD" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.8 KiB |
@@ -241,6 +241,7 @@ extension AppColor on Color {
|
||||
static const steelGrayA540 = Color(0xFF55687D);
|
||||
static const steelGray200 = Color(0xFFAEB7C2);
|
||||
static const blue700 = Color(0xFF208BFF);
|
||||
static const steelGray400 = Color(0xFF818C99);
|
||||
|
||||
static const mapGradientColor = [
|
||||
[Color(0xFF21D4FD), Color(0xFFB721FF)],
|
||||
|
||||
@@ -20,6 +20,8 @@ class HtmlContentViewerOnWeb extends StatefulWidget {
|
||||
final double widthContent;
|
||||
final double heightContent;
|
||||
final TextDirection? direction;
|
||||
final double? contentPadding;
|
||||
final bool useDefaultFont;
|
||||
|
||||
/// Handler for mailto: links
|
||||
final OnMailtoClicked? mailtoDelegate;
|
||||
@@ -37,10 +39,12 @@ class HtmlContentViewerOnWeb extends StatefulWidget {
|
||||
required this.widthContent,
|
||||
required this.heightContent,
|
||||
this.allowResizeToDocumentSize = true,
|
||||
this.useDefaultFont = false,
|
||||
this.mailtoDelegate,
|
||||
this.direction,
|
||||
this.onClickHyperLinkAction,
|
||||
this.keepWidthWhileLoading = false,
|
||||
this.contentPadding,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
@@ -264,7 +268,10 @@ class _HtmlContentViewerOnWebState extends State<HtmlContentViewerOnWeb> {
|
||||
minWidth: _minWidth,
|
||||
styleCSS: HtmlTemplate.tooltipLinkCss,
|
||||
javaScripts: webViewActionScripts + scriptsDisableZoom + HtmlInteraction.scriptsHandleLazyLoadingBackgroundImage,
|
||||
direction: widget.direction);
|
||||
direction: widget.direction,
|
||||
contentPadding: widget.contentPadding,
|
||||
useDefaultFont: widget.useDefaultFont,
|
||||
);
|
||||
|
||||
return htmlTemplate;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@ class HtmlContentViewer extends StatefulWidget {
|
||||
final double? initialWidth;
|
||||
final TextDirection? direction;
|
||||
final bool keepWidthWhileLoading;
|
||||
final double? contentPadding;
|
||||
final bool useDefaultFont;
|
||||
|
||||
final OnLoadWidthHtmlViewerAction? onLoadWidthHtmlViewer;
|
||||
final OnMailtoDelegateAction? onMailtoDelegateAction;
|
||||
@@ -39,6 +41,8 @@ class HtmlContentViewer extends StatefulWidget {
|
||||
this.initialWidth,
|
||||
this.direction,
|
||||
this.keepWidthWhileLoading = false,
|
||||
this.contentPadding,
|
||||
this.useDefaultFont = false,
|
||||
this.onLoadWidthHtmlViewer,
|
||||
this.onMailtoDelegateAction,
|
||||
this.onScrollHorizontalEnd,
|
||||
@@ -105,7 +109,9 @@ class _HtmlContentViewState extends State<HtmlContentViewer> {
|
||||
_htmlData = HtmlUtils.generateHtmlDocument(
|
||||
content: widget.contentHtml,
|
||||
direction: widget.direction,
|
||||
javaScripts: _customScripts
|
||||
javaScripts: _customScripts,
|
||||
contentPadding: widget.contentPadding,
|
||||
useDefaultFont: widget.useDefaultFont,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,9 @@ class HtmlUtils {
|
||||
String? styleCSS,
|
||||
String? javaScripts,
|
||||
bool hideScrollBar = true,
|
||||
TextDirection? direction
|
||||
bool useDefaultFont = false,
|
||||
TextDirection? direction,
|
||||
double? contentPadding,
|
||||
}) {
|
||||
return '''
|
||||
<!DOCTYPE html>
|
||||
@@ -103,6 +105,13 @@ class HtmlUtils {
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<style>
|
||||
${useDefaultFont ? '''
|
||||
body {
|
||||
font-family: Arial, 'Inter', sans-serif; /* Fall back to sans-serif if fonts aren't available */
|
||||
font-size: 16pt;
|
||||
line-height: 24pt;
|
||||
}
|
||||
''' : ''}
|
||||
.tmail-content {
|
||||
min-height: ${minHeight ?? 0}px;
|
||||
min-width: ${minWidth ?? 0}px;
|
||||
@@ -120,7 +129,7 @@ class HtmlUtils {
|
||||
${styleCSS ?? ''}
|
||||
</style>
|
||||
</head>
|
||||
<body ${direction == TextDirection.rtl ? 'dir="rtl"' : ''} style = "overflow-x: hidden">
|
||||
<body ${direction == TextDirection.rtl ? 'dir="rtl"' : ''} style = "overflow-x: hidden; ${contentPadding != null ? 'margin: $contentPadding;' : ''}";>
|
||||
<div class="tmail-content">$content</div>
|
||||
${javaScripts ?? ''}
|
||||
</body>
|
||||
|
||||
@@ -18,7 +18,7 @@ class EmailAvatarBuilder extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return (AvatarBuilder()
|
||||
..text(emailSelected.getAvatarText())
|
||||
..size(48)
|
||||
..size(50)
|
||||
..addTextStyle(const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 21,
|
||||
|
||||
@@ -278,10 +278,9 @@ class EmailView extends GetWidget<SingleEmailController> {
|
||||
: controller.imagePaths.icNewer,
|
||||
iconColor: controller.emailSupervisorController.nextEmailActivated
|
||||
? AppColor.primaryColor
|
||||
: AppColor.colorAttachmentIcon,
|
||||
: EmailViewStyles.iconColor,
|
||||
iconSize: EmailViewStyles.pageViewIconSize,
|
||||
backgroundColor: Colors.transparent,
|
||||
padding: EmailViewStyles.pageViewButtonPadding,
|
||||
tooltipMessage: AppLocalizations.of(context).newer,
|
||||
onTapActionCallback: controller.emailSupervisorController.moveToNextEmail
|
||||
),
|
||||
@@ -291,9 +290,8 @@ class EmailView extends GetWidget<SingleEmailController> {
|
||||
: controller.imagePaths.icOlder,
|
||||
iconColor: controller.emailSupervisorController.previousEmailActivated
|
||||
? AppColor.primaryColor
|
||||
: AppColor.colorAttachmentIcon,
|
||||
: EmailViewStyles.iconColor,
|
||||
iconSize: EmailViewStyles.pageViewIconSize,
|
||||
padding: EmailViewStyles.pageViewButtonPadding,
|
||||
backgroundColor: Colors.transparent,
|
||||
tooltipMessage: AppLocalizations.of(context).older,
|
||||
onTapActionCallback: controller.emailSupervisorController.backToPreviousEmail
|
||||
@@ -390,7 +388,7 @@ class EmailView extends GetWidget<SingleEmailController> {
|
||||
if (PlatformInfo.isWeb) {
|
||||
return Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.only(start: 16, bottom: 16),
|
||||
padding: EmailViewStyles.emailContentPadding,
|
||||
child: LayoutBuilder(builder: (context, constraints) {
|
||||
return Obx(() {
|
||||
return Stack(
|
||||
@@ -401,6 +399,8 @@ class EmailView extends GetWidget<SingleEmailController> {
|
||||
contentHtml: allEmailContents,
|
||||
mailtoDelegate: controller.openMailToLink,
|
||||
direction: AppUtils.getCurrentDirection(context),
|
||||
contentPadding: 0,
|
||||
useDefaultFont: true,
|
||||
),
|
||||
if (controller.mailboxDashBoardController.isAttachmentDraggableAppActive)
|
||||
PointerInterceptor(
|
||||
@@ -438,6 +438,8 @@ class EmailView extends GetWidget<SingleEmailController> {
|
||||
contentHtml: allEmailContents,
|
||||
initialWidth: constraints.maxWidth,
|
||||
direction: AppUtils.getCurrentDirection(context),
|
||||
contentPadding: 0,
|
||||
useDefaultFont: true,
|
||||
onMailtoDelegateAction: controller.openMailToLink,
|
||||
onScrollHorizontalEnd: controller.toggleScrollPhysicsPagerView,
|
||||
onLoadWidthHtmlViewer: controller.emailSupervisorController.updateScrollPhysicPageView,
|
||||
@@ -457,6 +459,8 @@ class EmailView extends GetWidget<SingleEmailController> {
|
||||
contentHtml: allEmailContents,
|
||||
initialWidth: constraints.maxWidth,
|
||||
direction: AppUtils.getCurrentDirection(context),
|
||||
contentPadding: 0,
|
||||
useDefaultFont: true,
|
||||
onMailtoDelegateAction: controller.openMailToLink,
|
||||
onScrollHorizontalEnd: controller.toggleScrollPhysicsPagerView,
|
||||
onLoadWidthHtmlViewer: controller.emailSupervisorController.updateScrollPhysicPageView,
|
||||
|
||||
@@ -10,7 +10,6 @@ class EmailViewAppBarWidgetStyles {
|
||||
static const double radius = 20;
|
||||
static double buttonIconSize = IconUtils.defaultIconSize;
|
||||
static const double deleteButtonIconSize = 20;
|
||||
static const double space = 5;
|
||||
static double? heightIOS(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||
if (responsiveUtils.isLandscapeMobile(context)) {
|
||||
return 60;
|
||||
@@ -24,6 +23,7 @@ class EmailViewAppBarWidgetStyles {
|
||||
static const Color deletePermanentButtonColor = AppColor.colorDeletePermanentlyButton;
|
||||
static const Color buttonActivatedColor = AppColor.primaryColor;
|
||||
static const Color buttonDeactivatedColor = AppColor.colorAttachmentIcon;
|
||||
static const Color iconColor = AppColor.steelGrayA540;
|
||||
|
||||
static EdgeInsetsGeometry paddingIOS(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||
if (responsiveUtils.isLandscapeMobile(context)) {
|
||||
@@ -35,5 +35,4 @@ class EmailViewAppBarWidgetStyles {
|
||||
}
|
||||
}
|
||||
static const EdgeInsetsGeometry padding = EdgeInsetsDirectional.symmetric(horizontal: 16);
|
||||
static const EdgeInsetsGeometry buttonPadding = EdgeInsets.all(5);
|
||||
}
|
||||
@@ -5,12 +5,12 @@ import 'package:flutter/material.dart';
|
||||
class EmailViewBackButtonStyles {
|
||||
static const double offsetWidth = 270;
|
||||
|
||||
static const Color iconColor = AppColor.primaryColor;
|
||||
static const Color iconColor = AppColor.steelGrayA540;
|
||||
|
||||
static const EdgeInsetsGeometry rtlPadding = EdgeInsetsDirectional.symmetric(horizontal: 8);
|
||||
|
||||
static const TextStyle labelTextStyle = TextStyle(
|
||||
fontSize: 17,
|
||||
color: AppColor.colorTextButton
|
||||
color: AppColor.steelGrayA540
|
||||
);
|
||||
}
|
||||
@@ -10,6 +10,7 @@ class EmailViewBottomBarWidgetStyles {
|
||||
static const double buttonIconSize = 20;
|
||||
static const double radius = 20;
|
||||
|
||||
static const Color iconColor = AppColor.steelGrayA540;
|
||||
static const Color topBorderColor = AppColor.colorDividerHorizontal;
|
||||
static const Color backgroundColor = Colors.white;
|
||||
static const Color buttonBackgroundColor = Colors.transparent;
|
||||
@@ -29,7 +30,7 @@ class EmailViewBottomBarWidgetStyles {
|
||||
) {
|
||||
return TextStyle(
|
||||
fontSize: responsiveUtils.isPortraitMobile(context) ? 12 : 16,
|
||||
color: AppColor.colorTextButton
|
||||
color: EmailViewBottomBarWidgetStyles.iconColor,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/icon_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -7,5 +8,13 @@ class EmailViewStyles {
|
||||
static const double mobileContentVerticalMargin = 12;
|
||||
static double pageViewIconSize = IconUtils.defaultIconSize;
|
||||
|
||||
static const EdgeInsetsGeometry pageViewButtonPadding = EdgeInsets.all(5);
|
||||
static const Color iconColor = AppColor.steelGrayA540;
|
||||
|
||||
static const EdgeInsetsGeometry emailContentPadding =
|
||||
EdgeInsetsDirectional.only(
|
||||
start: 16,
|
||||
bottom: 16,
|
||||
end: 16,
|
||||
top: 8,
|
||||
);
|
||||
}
|
||||
@@ -236,8 +236,9 @@ class _EmailReceiverWidgetState extends State<EmailReceiverWidget> {
|
||||
? emailAddress.asString()
|
||||
: '${emailAddress.asString()},',
|
||||
textStyle: Theme.of(context).textTheme.labelSmall?.copyWith(
|
||||
color: Colors.black,
|
||||
color: AppColor.steelGray400,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
padding: const EdgeInsetsDirectional.symmetric(vertical: 5, horizontal: 8),
|
||||
backgroundColor: Colors.transparent,
|
||||
|
||||
@@ -66,6 +66,7 @@ class EmailViewAppBarWidget extends StatelessWidget {
|
||||
child: Row(children: [
|
||||
if (_supportDisplayMailboxNameTitle(context))
|
||||
EmailViewBackButton(
|
||||
imagePaths: _imagePaths,
|
||||
onBackAction: onBackAction,
|
||||
mailboxContain: mailboxContain,
|
||||
isSearchActivated: isSearchActivated,
|
||||
@@ -74,23 +75,22 @@ class EmailViewAppBarWidget extends StatelessWidget {
|
||||
const Spacer(),
|
||||
Row(
|
||||
children: [
|
||||
const SizedBox(width: EmailViewAppBarWidgetStyles.space),
|
||||
if (optionsWidget != null) ... optionsWidget!,
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: _imagePaths.icMoveEmail,
|
||||
iconSize: EmailViewAppBarWidgetStyles.buttonIconSize,
|
||||
iconColor: EmailViewAppBarWidgetStyles.iconColor,
|
||||
tooltipMessage: AppLocalizations.of(context).move_message,
|
||||
backgroundColor: Colors.transparent,
|
||||
padding: EmailViewAppBarWidgetStyles.buttonPadding,
|
||||
onTapActionCallback: () => onEmailActionClick?.call(presentationEmail, EmailActionType.moveToMailbox)
|
||||
),
|
||||
const SizedBox(width: EmailViewAppBarWidgetStyles.space),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: presentationEmail.hasStarred
|
||||
? _imagePaths.icStar
|
||||
: _imagePaths.icUnStar,
|
||||
iconSize: EmailViewAppBarWidgetStyles.buttonIconSize,
|
||||
iconColor: EmailViewAppBarWidgetStyles.iconColor,
|
||||
backgroundColor: Colors.transparent,
|
||||
padding: EmailViewAppBarWidgetStyles.buttonPadding,
|
||||
tooltipMessage: presentationEmail.hasStarred
|
||||
? AppLocalizations.of(context).not_starred
|
||||
: AppLocalizations.of(context).mark_as_starred,
|
||||
@@ -100,35 +100,30 @@ class EmailViewAppBarWidget extends StatelessWidget {
|
||||
)
|
||||
),
|
||||
Obx(() {
|
||||
if (_singleEmailController.currentEmailLoaded.value != null
|
||||
&& PlatformInfo.isWeb
|
||||
&& PlatformInfo.isCanvasKit
|
||||
) {
|
||||
return TMailButtonWidget.fromIcon(
|
||||
icon: _imagePaths.icPrinter,
|
||||
margin: const EdgeInsetsDirectional.only(start: EmailViewAppBarWidgetStyles.space),
|
||||
iconSize: EmailViewAppBarWidgetStyles.deleteButtonIconSize,
|
||||
backgroundColor: Colors.transparent,
|
||||
padding: EmailViewAppBarWidgetStyles.buttonPadding,
|
||||
tooltipMessage: AppLocalizations.of(context).printAll,
|
||||
onTapActionCallback: () => onEmailActionClick?.call(
|
||||
presentationEmail,
|
||||
EmailActionType.printAll
|
||||
)
|
||||
if (PlatformInfo.isWeb && PlatformInfo.isCanvasKit) {
|
||||
return AbsorbPointer(
|
||||
absorbing: _singleEmailController.currentEmailLoaded.value == null,
|
||||
child: TMailButtonWidget.fromIcon(
|
||||
icon: _imagePaths.icPrinter,
|
||||
iconSize: EmailViewAppBarWidgetStyles.deleteButtonIconSize,
|
||||
iconColor: EmailViewAppBarWidgetStyles.iconColor,
|
||||
backgroundColor: Colors.transparent,
|
||||
tooltipMessage: AppLocalizations.of(context).printAll,
|
||||
onTapActionCallback: () => onEmailActionClick?.call(
|
||||
presentationEmail,
|
||||
EmailActionType.printAll,
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
}),
|
||||
const SizedBox(width: EmailViewAppBarWidgetStyles.space),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: _imagePaths.icDeleteComposer,
|
||||
iconSize: EmailViewAppBarWidgetStyles.deleteButtonIconSize,
|
||||
iconColor: EmailViewAppBarWidgetStyles.iconColor,
|
||||
backgroundColor: Colors.transparent,
|
||||
padding: EmailViewAppBarWidgetStyles.buttonPadding,
|
||||
iconColor: canDeletePermanently
|
||||
? EmailViewAppBarWidgetStyles.deletePermanentButtonColor
|
||||
: EmailViewAppBarWidgetStyles.emptyTrashButtonColor,
|
||||
tooltipMessage: canDeletePermanently
|
||||
? AppLocalizations.of(context).delete_permanently
|
||||
: AppLocalizations.of(context).move_to_trash,
|
||||
@@ -140,12 +135,11 @@ class EmailViewAppBarWidget extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
),
|
||||
const SizedBox(width: EmailViewAppBarWidgetStyles.space),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: _imagePaths.icMore,
|
||||
icon: _imagePaths.icMoreVertical,
|
||||
iconSize: EmailViewAppBarWidgetStyles.buttonIconSize,
|
||||
iconColor: EmailViewAppBarWidgetStyles.iconColor,
|
||||
backgroundColor: Colors.transparent,
|
||||
padding: EmailViewAppBarWidgetStyles.buttonPadding,
|
||||
tooltipMessage: AppLocalizations.of(context).more,
|
||||
onTapActionCallback: _responsiveUtils.isScreenWithShortestSide(context)
|
||||
? () => onMoreActionClick?.call(presentationEmail, null)
|
||||
@@ -154,9 +148,6 @@ class EmailViewAppBarWidget extends StatelessWidget {
|
||||
? (position) => onMoreActionClick?.call(presentationEmail, position)
|
||||
: null
|
||||
),
|
||||
if(optionsWidget != null)
|
||||
...optionsWidget!,
|
||||
const SizedBox(width: EmailViewAppBarWidgetStyles.space),
|
||||
]
|
||||
),
|
||||
])
|
||||
|
||||
@@ -3,22 +3,22 @@ import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||
import 'package:core/utils/direction_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:model/mailbox/presentation_mailbox.dart';
|
||||
import 'package:tmail_ui_user/features/email/presentation/styles/email_view_back_button_styles.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/presentation/extensions/presentation_mailbox_extension.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
|
||||
class EmailViewBackButton extends StatelessWidget {
|
||||
final _imagePaths = Get.find<ImagePaths>();
|
||||
|
||||
final ImagePaths imagePaths;
|
||||
final bool isSearchActivated;
|
||||
final VoidCallback onBackAction;
|
||||
final double maxWidth;
|
||||
final PresentationMailbox? mailboxContain;
|
||||
|
||||
EmailViewBackButton({
|
||||
const EmailViewBackButton({
|
||||
super.key,
|
||||
required this.imagePaths,
|
||||
required this.onBackAction,
|
||||
required this.isSearchActivated,
|
||||
required this.maxWidth,
|
||||
@@ -31,8 +31,8 @@ class EmailViewBackButton extends StatelessWidget {
|
||||
return TMailButtonWidget(
|
||||
text: mailboxContain?.getDisplayName(context) ?? '',
|
||||
icon: DirectionUtils.isDirectionRTLByLanguage(context)
|
||||
? _imagePaths.icArrowRight
|
||||
: _imagePaths.icBack,
|
||||
? imagePaths.icArrowRight
|
||||
: imagePaths.icBack,
|
||||
iconColor: EmailViewBackButtonStyles.iconColor,
|
||||
textStyle: EmailViewBackButtonStyles.labelTextStyle,
|
||||
backgroundColor: Colors.transparent,
|
||||
@@ -49,8 +49,8 @@ class EmailViewBackButton extends StatelessWidget {
|
||||
} else {
|
||||
return TMailButtonWidget.fromIcon(
|
||||
icon: DirectionUtils.isDirectionRTLByLanguage(context)
|
||||
? _imagePaths.icArrowRight
|
||||
: _imagePaths.icBack,
|
||||
? imagePaths.icArrowRight
|
||||
: imagePaths.icBack,
|
||||
iconColor: EmailViewBackButtonStyles.iconColor,
|
||||
padding: DirectionUtils.isDirectionRTLByLanguage(context)
|
||||
? EmailViewBackButtonStyles.rtlPadding
|
||||
|
||||
@@ -62,6 +62,7 @@ class EmailViewBottomBarWidget extends StatelessWidget {
|
||||
icon: _imagePaths.icReplyAll,
|
||||
borderRadius: EmailViewBottomBarWidgetStyles.buttonRadius,
|
||||
iconSize: EmailViewBottomBarWidgetStyles.buttonIconSize,
|
||||
iconColor: EmailViewBottomBarWidgetStyles.iconColor,
|
||||
textAlign: TextAlign.center,
|
||||
flexibleText: true,
|
||||
padding: EmailViewBottomBarWidgetStyles.buttonPadding,
|
||||
@@ -116,6 +117,7 @@ class EmailViewBottomBarWidget extends StatelessWidget {
|
||||
icon: _imagePaths.icReply,
|
||||
borderRadius: EmailViewBottomBarWidgetStyles.buttonRadius,
|
||||
iconSize: EmailViewBottomBarWidgetStyles.buttonIconSize,
|
||||
iconColor: EmailViewBottomBarWidgetStyles.iconColor,
|
||||
textAlign: TextAlign.center,
|
||||
flexibleText: true,
|
||||
padding: EmailViewBottomBarWidgetStyles.buttonPadding,
|
||||
@@ -138,6 +140,7 @@ class EmailViewBottomBarWidget extends StatelessWidget {
|
||||
icon: _imagePaths.icForward,
|
||||
borderRadius: EmailViewBottomBarWidgetStyles.buttonRadius,
|
||||
iconSize: EmailViewBottomBarWidgetStyles.buttonIconSize,
|
||||
iconColor: EmailViewBottomBarWidgetStyles.iconColor,
|
||||
textAlign: TextAlign.center,
|
||||
flexibleText: true,
|
||||
padding: EmailViewBottomBarWidgetStyles.buttonPadding,
|
||||
@@ -158,6 +161,7 @@ class EmailViewBottomBarWidget extends StatelessWidget {
|
||||
icon: _imagePaths.icNewMessage,
|
||||
borderRadius: EmailViewBottomBarWidgetStyles.buttonRadius,
|
||||
iconSize: EmailViewBottomBarWidgetStyles.buttonIconSize,
|
||||
iconColor: EmailViewBottomBarWidgetStyles.iconColor,
|
||||
textAlign: TextAlign.center,
|
||||
flexibleText: true,
|
||||
padding: EmailViewBottomBarWidgetStyles.buttonPadding,
|
||||
|
||||
@@ -18,7 +18,7 @@ class PrefixRecipientWidget extends StatelessWidget {
|
||||
style: Theme.of(context).textTheme.labelMedium?.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColor.colorEmailAddressFull
|
||||
color: AppColor.steelGray400
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user