TF-3944 Use new style with line height 24px in content writing of composer view
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ class HideDraftSignatureTransformer extends DomTransformer {
|
|||||||
Map<String, String>? mapUrlDownloadCID
|
Map<String, String>? mapUrlDownloadCID
|
||||||
}) async {
|
}) async {
|
||||||
try {
|
try {
|
||||||
final signature = document.querySelector('div.tmail-signature');
|
final signature = document.querySelector('.tmail-signature');
|
||||||
if (signature == null) return;
|
if (signature == null) return;
|
||||||
final currentStyle = signature.attributes['style']?.trim();
|
final currentStyle = signature.attributes['style']?.trim();
|
||||||
if (currentStyle == null) {
|
if (currentStyle == null) {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class SignatureTransformer extends DomTransformer {
|
|||||||
Map<String, String>? mapUrlDownloadCID,
|
Map<String, String>? mapUrlDownloadCID,
|
||||||
}) async {
|
}) async {
|
||||||
try {
|
try {
|
||||||
final signatureElements = document.querySelectorAll('div.tmail-signature');
|
final signatureElements = document.querySelectorAll('.tmail-signature');
|
||||||
|
|
||||||
if (signatureElements.isEmpty) return;
|
if (signatureElements.isEmpty) return;
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,10 @@ class HtmlTemplate {
|
|||||||
|
|
||||||
static const String printDocumentCssStyle = '''
|
static const String printDocumentCssStyle = '''
|
||||||
<style>
|
<style>
|
||||||
|
$fontFaceStyle
|
||||||
|
|
||||||
body,td,div,p,a,input {
|
body,td,div,p,a,input {
|
||||||
font-family: arial, sans-serif;
|
font-family: 'Inter', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
body, td {
|
body, td {
|
||||||
@@ -102,12 +104,27 @@ class HtmlTemplate {
|
|||||||
''';
|
''';
|
||||||
|
|
||||||
static const String defaultFontStyle = '''
|
static const String defaultFontStyle = '''
|
||||||
body {
|
div, p, span, th, td, tr, ul, ol, li, a, button {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
letter-spacing: -0.01em; /* -1% */
|
letter-spacing: -0.01em; /* -1% */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
''';
|
||||||
|
|
||||||
|
static const String defaultEditorFontStyle = '''
|
||||||
|
#editor, .note-editable, .note-frame {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #222222;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
''';
|
''';
|
||||||
|
|
||||||
static const String previewEMLFileCssStyle = '''
|
static const String previewEMLFileCssStyle = '''
|
||||||
@@ -271,7 +288,7 @@ class HtmlTemplate {
|
|||||||
<style>
|
<style>
|
||||||
${HtmlTemplate.fontFaceStyle}
|
${HtmlTemplate.fontFaceStyle}
|
||||||
|
|
||||||
${useDefaultFontStyle ? HtmlTemplate.defaultFontStyle : ''}
|
${useDefaultFontStyle ? HtmlTemplate.defaultEditorFontStyle : ''}
|
||||||
|
|
||||||
${customScrollbar ? '''
|
${customScrollbar ? '''
|
||||||
html, .note-editable, .note-codable {
|
html, .note-editable, .note-codable {
|
||||||
@@ -311,7 +328,7 @@ class HtmlTemplate {
|
|||||||
}) => '''
|
}) => '''
|
||||||
${HtmlTemplate.fontFaceStyle}
|
${HtmlTemplate.fontFaceStyle}
|
||||||
|
|
||||||
${useDefaultFontStyle ? HtmlTemplate.defaultFontStyle : ''}
|
${useDefaultFontStyle ? HtmlTemplate.defaultEditorFontStyle : ''}
|
||||||
|
|
||||||
#editor {
|
#editor {
|
||||||
direction: ${direction.name};
|
direction: ${direction.name};
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ class HtmlUtils {
|
|||||||
<style>
|
<style>
|
||||||
.note-frame, .note-tooltip-content, .note-popover {
|
.note-frame, .note-tooltip-content, .note-popover {
|
||||||
font-family: 'Inter', sans-serif;
|
font-family: 'Inter', sans-serif;
|
||||||
|
color: #222222;
|
||||||
}
|
}
|
||||||
|
|
||||||
.note-editable {
|
.note-editable {
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ extension SanitizeSignatureInEmailContentExtension on ComposerController {
|
|||||||
final existedSignatureButton = emailDocument.querySelector('.tmail-signature-button');
|
final existedSignatureButton = emailDocument.querySelector('.tmail-signature-button');
|
||||||
if (existedSignatureButton != null) return;
|
if (existedSignatureButton != null) return;
|
||||||
|
|
||||||
final signature = emailDocument.querySelector('div.tmail-signature');
|
final signature = emailDocument.querySelector('.tmail-signature');
|
||||||
if (signature == null) return;
|
if (signature == null) return;
|
||||||
|
|
||||||
restoringSignatureButton = true;
|
restoringSignatureButton = true;
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ class HtmlAnalyzer {
|
|||||||
Future<String> removeCollapsedExpandedSignatureEffect({required String emailContent}) async {
|
Future<String> removeCollapsedExpandedSignatureEffect({required String emailContent}) async {
|
||||||
try {
|
try {
|
||||||
final document = parse(emailContent);
|
final document = parse(emailContent);
|
||||||
final signatureElements = document.querySelectorAll('div.tmail-signature');
|
final signatureElements = document.querySelectorAll('.tmail-signature');
|
||||||
await Future.wait(signatureElements.map((signatureTag) async {
|
await Future.wait(signatureElements.map((signatureTag) async {
|
||||||
final signatureChildren = signatureTag.children;
|
final signatureChildren = signatureTag.children;
|
||||||
for (var child in signatureChildren) {
|
for (var child in signatureChildren) {
|
||||||
|
|||||||
Reference in New Issue
Block a user