diff --git a/assets/images/ic_attach_file.svg b/assets/images/ic_attach_file.svg new file mode 100644 index 000000000..4fa9fd385 --- /dev/null +++ b/assets/images/ic_attach_file.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/ic_attachments_composer.svg b/assets/images/ic_attachments_composer.svg deleted file mode 100644 index 9dacdfabe..000000000 --- a/assets/images/ic_attachments_composer.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/images/ic_cancel.svg b/assets/images/ic_cancel.svg new file mode 100644 index 000000000..f934a5680 --- /dev/null +++ b/assets/images/ic_cancel.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/ic_close_advanced_search.svg b/assets/images/ic_circle_close.svg similarity index 100% rename from assets/images/ic_close_advanced_search.svg rename to assets/images/ic_circle_close.svg diff --git a/assets/images/ic_close.svg b/assets/images/ic_close.svg index cb1b7c340..ab4826af2 100644 --- a/assets/images/ic_close.svg +++ b/assets/images/ic_close.svg @@ -1,3 +1,3 @@ - - + + diff --git a/assets/images/ic_close_composer.svg b/assets/images/ic_close_composer.svg deleted file mode 100644 index ab4826af2..000000000 --- a/assets/images/ic_close_composer.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/images/ic_close_mailbox.svg b/assets/images/ic_close_mailbox.svg deleted file mode 100644 index f5c33a4af..000000000 --- a/assets/images/ic_close_mailbox.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/assets/images/ic_fullscreen.svg b/assets/images/ic_fullscreen.svg new file mode 100644 index 000000000..005ca75ee --- /dev/null +++ b/assets/images/ic_fullscreen.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/ic_fullscreen_composer.svg b/assets/images/ic_fullscreen_composer.svg deleted file mode 100644 index 9f92b83d7..000000000 --- a/assets/images/ic_fullscreen_composer.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/assets/images/ic_insert_image.svg b/assets/images/ic_insert_image.svg index 07da9c41b..f0a764cc8 100644 --- a/assets/images/ic_insert_image.svg +++ b/assets/images/ic_insert_image.svg @@ -1,3 +1,3 @@ - - + + diff --git a/assets/images/ic_minimize.svg b/assets/images/ic_minimize.svg index 999a094a3..fccb7f812 100644 --- a/assets/images/ic_minimize.svg +++ b/assets/images/ic_minimize.svg @@ -1,3 +1,3 @@ - - + + diff --git a/assets/images/ic_rich_toolbar.svg b/assets/images/ic_rich_toolbar.svg new file mode 100644 index 000000000..fd994920b --- /dev/null +++ b/assets/images/ic_rich_toolbar.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/ic_save_to_draft.svg b/assets/images/ic_save_to_draft.svg new file mode 100644 index 000000000..a8611e0e4 --- /dev/null +++ b/assets/images/ic_save_to_draft.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/ic_send.svg b/assets/images/ic_send.svg new file mode 100644 index 000000000..b28c1fb46 --- /dev/null +++ b/assets/images/ic_send.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/ic_send_disable.svg b/assets/images/ic_send_disable.svg index d17fb2804..d2ce6d5d2 100644 --- a/assets/images/ic_send_disable.svg +++ b/assets/images/ic_send_disable.svg @@ -1,3 +1,3 @@ - + diff --git a/assets/images/ic_style_code_view.svg b/assets/images/ic_style_code_view.svg index 9c304ebf3..0ccbdd8ea 100644 --- a/assets/images/ic_style_code_view.svg +++ b/assets/images/ic_style_code_view.svg @@ -1,3 +1,3 @@ - - + + diff --git a/core/lib/core.dart b/core/lib/core.dart index ff80bf329..a98fe21bc 100644 --- a/core/lib/core.dart +++ b/core/lib/core.dart @@ -83,6 +83,7 @@ export 'presentation/views/bottom_popup/full_screen_action_sheet_builder.dart'; export 'presentation/views/checkbox/labeled_checkbox.dart'; export 'presentation/views/container/tmail_container_widget.dart'; export 'presentation/views/clipper/side_arrow_clipper.dart'; +export 'presentation/views/avatar/gradient_circle_avatar_icon.dart'; // Resources export 'presentation/resources/assets_paths.dart'; diff --git a/core/lib/presentation/extensions/color_extension.dart b/core/lib/presentation/extensions/color_extension.dart index 3ba17921e..3b9ce0000 100644 --- a/core/lib/presentation/extensions/color_extension.dart +++ b/core/lib/presentation/extensions/color_extension.dart @@ -207,6 +207,15 @@ extension AppColor on Color { static const colorEmptyPopupDialogButton = Color(0xFFFFC107); static const colorCancelPopupDialogButton = Color(0xFFEBEDF0); static const colorRemoveRuleFilterConditionButton = Color(0xFFE6E8EC); + static const colorComposerShadowTop = Color(0x28000000); + static const colorComposerShadowBottom = Color(0x1E000000); + static const colorComposerAppBar = Color(0xFFF4F4F4); + static const colorLabelComposer = Color(0xFF8C9CAF); + static const colorLineComposer = Color(0xFFF4F4F4); + static const colorPrefixButtonComposer = Color(0xFFAEAAAE); + static const colorRichButtonComposer = Color(0xFFAEAEC0); + static const colorMobileRichButtonComposer = Color(0xFF8C9CAF); + static const colorSelected = Color(0xFFE3F1FF); static const mapGradientColor = [ [Color(0xFF21D4FD), Color(0xFFB721FF)], diff --git a/core/lib/presentation/resources/image_paths.dart b/core/lib/presentation/resources/image_paths.dart index ddf2e0939..af74e290b 100644 --- a/core/lib/presentation/resources/image_paths.dart +++ b/core/lib/presentation/resources/image_paths.dart @@ -35,7 +35,7 @@ class ImagePaths { String get icForward => _getImagePath('ic_forward.svg'); String get icMoveEmail => _getImagePath('ic_move_email.svg'); String get icUnreadEmail => _getImagePath('ic_unread_email.svg'); - String get icCloseMailbox => _getImagePath('ic_close_mailbox.svg'); + String get icCircleClose => _getImagePath('ic_circle_close.svg'); String get icAddNewFolder => _getImagePath('ic_add_new_folder.svg'); String get icFolderMailbox => _getImagePath('ic_folder_mailbox.svg'); String get icMailboxInbox => _getImagePath('ic_mailbox_inbox.svg'); @@ -55,9 +55,7 @@ class ImagePaths { String get icRemoveDialog => _getImagePath('ic_remove_dialog.svg'); String get icNewMessage => _getImagePath('ic_new_message.svg'); String get icUnreadStatus => _getImagePath('ic_unread_status.svg'); - String get icAttachmentsComposer => _getImagePath('ic_attachments_composer.svg'); - String get icCloseComposer => _getImagePath('ic_close_composer.svg'); - String get icFullScreenComposer => _getImagePath('ic_fullscreen_composer.svg'); + String get icFullScreen => _getImagePath('ic_fullscreen.svg'); String get icMinimize => _getImagePath('ic_minimize.svg'); String get icDeleteComposer => _getImagePath('ic_delete_composer.svg'); String get icDeleteAttachment => _getImagePath('ic_delete_attachment.svg'); @@ -110,7 +108,6 @@ class ImagePaths { String get icFilePdf => _getImagePath('ic_file_pdf.svg'); String get icFilePptx => _getImagePath('ic_file_pptx.svg'); String get icFileEPup => _getImagePath('ic_file_epup.svg'); - String get icCloseAdvancedSearch => _getImagePath('ic_close_advanced_search.svg'); String get icLanguage => _getImagePath('ic_language.svg'); String get icChecked => _getImagePath('ic_checked.svg'); String get icStyleBold => _getImagePath('ic_style_bold.svg'); @@ -199,6 +196,12 @@ class ImagePaths { String get icFormatQuote => _getImagePath('ic_format_quote.svg'); String get icTMailLogo => _getImagePath('ic_tmail_logo.svg'); String get icLoginGraphic => _getImagePath('ic_login_graphic.svg'); + String get icCancel => _getImagePath('ic_cancel.svg'); + String get icRichToolbar => _getImagePath('ic_rich_toolbar.svg'); + String get icSaveToDraft => _getImagePath('ic_save_to_draft.svg'); + String get icAttachmentFile => _getImagePath('ic_attachment_file.svg'); + String get icAttachFile => _getImagePath('ic_attach_file.svg'); + String get icSend => _getImagePath('ic_send.svg'); String _getImagePath(String imageName) { return AssetsPaths.images + imageName; diff --git a/lib/features/contact/presentation/widgets/gradient_color_avatar_icon.dart b/core/lib/presentation/views/avatar/gradient_circle_avatar_icon.dart similarity index 75% rename from lib/features/contact/presentation/widgets/gradient_color_avatar_icon.dart rename to core/lib/presentation/views/avatar/gradient_circle_avatar_icon.dart index 14a3d5263..acc50716c 100644 --- a/lib/features/contact/presentation/widgets/gradient_color_avatar_icon.dart +++ b/core/lib/presentation/views/avatar/gradient_circle_avatar_icon.dart @@ -2,15 +2,16 @@ import 'package:core/presentation/extensions/color_extension.dart'; import 'package:flutter/material.dart'; -class GradientColorAvatarIcon extends StatelessWidget { +class GradientCircleAvatarIcon extends StatelessWidget { final List colors; final double iconSize; final double labelFontSize; final String label; - const GradientColorAvatarIcon(this.colors, { + const GradientCircleAvatarIcon({ Key? key, + required this.colors, this.iconSize = 40, this.label = '', this.labelFontSize = 24.0, @@ -23,13 +24,13 @@ class GradientColorAvatarIcon extends StatelessWidget { height: iconSize, alignment: Alignment.center, decoration: BoxDecoration( - borderRadius: BorderRadius.circular(iconSize * 0.5), - border: Border.all(color: Colors.transparent), + shape: BoxShape.circle, gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, stops: const [0.0, 1.0], - colors: colors), + colors: colors + ), color: AppColor.avatarColor ), child: Text( @@ -37,7 +38,8 @@ class GradientColorAvatarIcon extends StatelessWidget { style: TextStyle( color: Colors.white, fontSize: labelFontSize, - fontWeight: FontWeight.w600) + fontWeight: FontWeight.w600 + ) ) ); } diff --git a/core/lib/presentation/views/button/tmail_button_widget.dart b/core/lib/presentation/views/button/tmail_button_widget.dart index 05a538b95..b7aa1ff52 100644 --- a/core/lib/presentation/views/button/tmail_button_widget.dart +++ b/core/lib/presentation/views/button/tmail_button_widget.dart @@ -33,6 +33,7 @@ class TMailButtonWidget extends StatelessWidget { final TextAlign? textAlign; final bool flexibleText; final BoxBorder? border; + final TextDirection iconAlignment; const TMailButtonWidget({ super.key, @@ -61,6 +62,7 @@ class TMailButtonWidget extends StatelessWidget { this.textAlign, this.flexibleText = false, this.border, + this.iconAlignment = TextDirection.ltr, }); factory TMailButtonWidget.fromIcon({ @@ -190,20 +192,31 @@ class TMailButtonWidget extends StatelessWidget { ] ); } else { - childWidget = Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SvgPicture.asset( - icon!, - width: iconSize, - height: iconSize, - fit: BoxFit.fill, - colorFilter: iconColor?.asFilter() - ), - SizedBox(width: iconSpace), - if (flexibleText) - Flexible( - child: Text( + if (iconAlignment == TextDirection.ltr) { + childWidget = Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SvgPicture.asset( + icon!, + width: iconSize, + height: iconSize, + fit: BoxFit.fill, + colorFilter: iconColor?.asFilter() + ), + SizedBox(width: iconSpace), + if (flexibleText) + Flexible( + child: Text( + text, + textAlign: textAlign, + style: textStyle ?? const TextStyle( + fontSize: 12, + color: AppColor.colorTextButtonHeaderThread + ), + ), + ) + else + Text( text, textAlign: textAlign, style: textStyle ?? const TextStyle( @@ -211,29 +224,54 @@ class TMailButtonWidget extends StatelessWidget { color: AppColor.colorTextButtonHeaderThread ), ), - ) - else - Text( - text, - textAlign: textAlign, - style: textStyle ?? const TextStyle( - fontSize: 12, - color: AppColor.colorTextButtonHeaderThread + if (trailingIcon != null) + Padding( + padding: EdgeInsetsDirectional.only(start: iconSpace), + child: SvgPicture.asset( + trailingIcon!, + width: trailingIconSize, + height: trailingIconSize, + fit: BoxFit.fill, + colorFilter: trailingIconColor?.asFilter() + ), ), - ), - if (trailingIcon != null) - Padding( - padding: EdgeInsetsDirectional.only(start: iconSpace), - child: SvgPicture.asset( - trailingIcon!, - width: trailingIconSize, - height: trailingIconSize, - fit: BoxFit.fill, - colorFilter: trailingIconColor?.asFilter() + ] + ); + } else { + childWidget = Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + if (flexibleText) + Flexible( + child: Text( + text, + textAlign: textAlign, + style: textStyle ?? const TextStyle( + fontSize: 12, + color: AppColor.colorTextButtonHeaderThread + ), + ), + ) + else + Text( + text, + textAlign: textAlign, + style: textStyle ?? const TextStyle( + fontSize: 12, + color: AppColor.colorTextButtonHeaderThread + ), ), + SizedBox(width: iconSpace), + SvgPicture.asset( + icon!, + width: iconSize, + height: iconSize, + fit: BoxFit.fill, + colorFilter: iconColor?.asFilter() ), - ] - ); + ] + ); + } } } else if (icon != null) { childWidget = SvgPicture.asset( diff --git a/core/lib/presentation/views/dialog/confirmation_dialog_builder.dart b/core/lib/presentation/views/dialog/confirmation_dialog_builder.dart index 5462c197d..556a94d50 100644 --- a/core/lib/presentation/views/dialog/confirmation_dialog_builder.dart +++ b/core/lib/presentation/views/dialog/confirmation_dialog_builder.dart @@ -181,7 +181,7 @@ class ConfirmDialogBuilder { child: Padding( padding: const EdgeInsets.only(top: 8, right: 8), child: buildIconWeb( - icon: SvgPicture.asset(_imagePath.icCloseMailbox, fit: BoxFit.fill), + icon: SvgPicture.asset(_imagePath.icCircleClose, fit: BoxFit.fill), onTap: () => _onCloseButtonAction?.call()) )), if (_iconWidget != null)