From e1af6b3d13b365e9a846786574093f45f291521d Mon Sep 17 00:00:00 2001 From: happyman125 Date: Mon, 29 Mar 2021 06:14:10 +0300 Subject: [PATCH 01/19] change font sizes of compose --- .../compose-mail/compose-mail.component.html | 21 +++---------------- .../compose-mail/compose-mail.component.ts | 9 ++++++-- src/app/shared/config.ts | 2 +- .../reply-secure-message.component.html | 15 ++++--------- .../reply-secure-message.component.ts | 7 +++++-- 5 files changed, 20 insertions(+), 34 deletions(-) diff --git a/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.html b/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.html index 2258a054d..58c6107a3 100644 --- a/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.html +++ b/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.html @@ -184,24 +184,9 @@
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • -
diff --git a/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.ts b/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.ts index 9ff9a697a..bb2707c61 100644 --- a/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.ts +++ b/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.ts @@ -22,7 +22,7 @@ import { debounceTime, finalize } from 'rxjs/operators'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import * as xss from 'xss'; -import { COLORS, FONTS, SummarySeparator } from '../../../shared/config'; +import { COLORS, FONTS, SummarySeparator, SIZES } from '../../../shared/config'; import { CloseMailbox, DeleteAttachment, @@ -83,7 +83,10 @@ FontAttributor.whitelist = [...FONTS]; Quill.register(FontAttributor, true); const SizeAttributor = Quill.import('attributors/style/size'); -SizeAttributor.whitelist = ['10px', '18px', '32px']; +const updatedSizes = SIZES.map((size, index) => { + return size + 'px'; +}); +SizeAttributor.whitelist = updatedSizes; Quill.register(SizeAttributor, true); Quill.register(Quill.import('attributors/style/align'), true); Quill.register(Quill.import('attributors/style/background'), true); @@ -263,6 +266,8 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnChanges, O fonts = FONTS; + sizes = updatedSizes; + mailData: any = {}; inputTextValue = ''; diff --git a/src/app/shared/config.ts b/src/app/shared/config.ts index 042154580..ef02f07af 100644 --- a/src/app/shared/config.ts +++ b/src/app/shared/config.ts @@ -131,7 +131,7 @@ export const VALID_EMAIL_REGEX: any = /^(([^\s"(),.:;<>@[\\\]]+(\.[^\s"(),.:;<>@ export const FONTS = ['lato', 'roboto', 'arial', 'times-new-roman']; export const COMPOSE_COLORS = ['none', 'red', 'blue', 'green', 'white', 'black', 'pink', 'grey']; -export const SIZES = [10, 14, 18, 32]; +export const SIZES = [10, 12, 14, 16, 18, 20, 24, 32]; export const BACKGROUNDS = ['none', 'red', 'blue', 'green', 'white', 'black', 'pink', 'grey']; export const AUTOSAVE_DURATION = ['none', '5000', '10000', '20000', '30000']; export const DEFAULT_FONT_SIZE = 14; diff --git a/src/app/users/reply-secure-message/reply-secure-message.component.html b/src/app/users/reply-secure-message/reply-secure-message.component.html index 668715386..2246973cf 100644 --- a/src/app/users/reply-secure-message/reply-secure-message.component.html +++ b/src/app/users/reply-secure-message/reply-secure-message.component.html @@ -66,17 +66,10 @@
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - +
  • +
diff --git a/src/app/users/reply-secure-message/reply-secure-message.component.ts b/src/app/users/reply-secure-message/reply-secure-message.component.ts index 43bcfc651..ede0c461f 100644 --- a/src/app/users/reply-secure-message/reply-secure-message.component.ts +++ b/src/app/users/reply-secure-message/reply-secure-message.component.ts @@ -3,7 +3,7 @@ import { Store } from '@ngrx/store'; import * as QuillNamespace from 'quill'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; -import { COLORS, FONTS } from '../../shared/config'; +import { COLORS, FONTS, SIZES } from '../../shared/config'; import { GetSecureMessageUserKeys, SendSecureMessageReply } from '../../store/actions'; import { AppState, SecureMessageState } from '../../store/datatypes'; import { Attachment, Mail } from '../../store/models'; @@ -16,7 +16,10 @@ FontAttributor.whitelist = [...FONTS]; Quill.register(FontAttributor, true); const SizeAttributor = Quill.import('attributors/style/size'); -SizeAttributor.whitelist = ['10px', '18px', '32px']; +const updatedSizes = SIZES.map((size, index) => { + return size + 'px'; +}); +SizeAttributor.whitelist = updatedSizes; Quill.register(SizeAttributor, true); Quill.register(Quill.import('attributors/style/align'), true); Quill.register(Quill.import('attributors/style/background'), true); From 3d1bcc6dfb63c9f6b5ec7fcc1d3a344b26aeb7c4 Mon Sep 17 00:00:00 2001 From: happyman125 Date: Mon, 29 Mar 2021 11:06:28 +0300 Subject: [PATCH 02/19] Add sizes --- .../reply-secure-message/reply-secure-message.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/users/reply-secure-message/reply-secure-message.component.ts b/src/app/users/reply-secure-message/reply-secure-message.component.ts index ede0c461f..96fd7e16d 100644 --- a/src/app/users/reply-secure-message/reply-secure-message.component.ts +++ b/src/app/users/reply-secure-message/reply-secure-message.component.ts @@ -77,6 +77,8 @@ export class ReplySecureMessageComponent implements OnInit, AfterViewInit, OnDes fonts = FONTS; + sizes = updatedSizes; + attachments: Attachment[] = []; inProgress: boolean; From 7a577157bcaa998ec4c6f80f75933800e6f45354 Mon Sep 17 00:00:00 2001 From: Eli Jin Date: Mon, 29 Mar 2021 14:47:25 -0400 Subject: [PATCH 03/19] fixed shrink issue on login page --- src/app/app.component.ts | 18 ------------------ src/app/footer/footer.component.scss | 10 ++++------ .../users-sign-in/users-sign-in.component.scss | 1 + .../users-sign-in/users-sign-in.component.ts | 7 ++++++- src/styles/layouts/_global.scss | 16 ++++++++++++++++ 5 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 807b05f71..8baccb835 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -85,24 +85,6 @@ export class AppComponent implements OnInit, OnDestroy { }); } - ngAfterViewChecked() { - // For big window height, fix bottom white space issue - const allContent = document.getElementById('app-outer-id'); - const header = document.getElementById('mastHead'); - const footer = document.getElementById('colphon'); - const mainContent = document.getElementById('login-main'); - if (allContent && mainContent) { - mainContent.style.height = - window.innerHeight > allContent.getBoundingClientRect().height - ? ( - window.innerHeight - - header.getBoundingClientRect().height - - footer.getBoundingClientRect().height - ).toString() + 'px' - : 'auto'; - } - } - private updateLoadingStatus(): void { this.store .select(state => state.loading) diff --git a/src/app/footer/footer.component.scss b/src/app/footer/footer.component.scss index eaf6ded49..57edc94c8 100644 --- a/src/app/footer/footer.component.scss +++ b/src/app/footer/footer.component.scss @@ -12,6 +12,10 @@ color: $menu-link; font-size: 0.875rem; + .app-credit { + color: #f8f9fa; + } + @include media('>sm') { padding: 3.125rem calc(2rem - 0.938rem) 2.188rem; } @@ -146,9 +150,3 @@ } } } - -.site-footer { - .app-credit { - color: #f8f9fa; - } -} diff --git a/src/app/users/users-sign-in/users-sign-in.component.scss b/src/app/users/users-sign-in/users-sign-in.component.scss index 64c6846b8..699890cd5 100644 --- a/src/app/users/users-sign-in/users-sign-in.component.scss +++ b/src/app/users/users-sign-in/users-sign-in.component.scss @@ -94,6 +94,7 @@ $error-red: #e94e4c; .login-main { min-height: 600px; + height: 100%; } .logged-in-spinner { diff --git a/src/app/users/users-sign-in/users-sign-in.component.ts b/src/app/users/users-sign-in/users-sign-in.component.ts index b1a9c6bd6..9c2329955 100644 --- a/src/app/users/users-sign-in/users-sign-in.component.ts +++ b/src/app/users/users-sign-in/users-sign-in.component.ts @@ -85,7 +85,10 @@ export class UsersSignInComponent implements OnDestroy, OnInit, AfterViewInit { private userService: UsersService, private router: Router, private openPgpService: OpenPgpService, - ) {} + ) { + document.querySelector('#main').classList.add('visible-signin'); + document.querySelector('#app-outer-id').classList.add('visible-signin'); + } ngOnInit() { this.store.dispatch(new ClearAuthErrorMessage()); @@ -149,6 +152,8 @@ export class UsersSignInComponent implements OnDestroy, OnInit, AfterViewInit { } ngOnDestroy() { + document.querySelector('#main').classList.remove('visible-signin'); + document.querySelector('#app-outer-id').classList.remove('visible-signin'); this.store.dispatch(new ClearAuthErrorMessage()); this.sharedService.hideFooter.emit(false); } diff --git a/src/styles/layouts/_global.scss b/src/styles/layouts/_global.scss index 7de389cb3..eca1f8745 100644 --- a/src/styles/layouts/_global.scss +++ b/src/styles/layouts/_global.scss @@ -29,6 +29,18 @@ body { overflow-x: hidden; overflow-y: hidden; position: relative; + min-height: 1150px; + @include media(' Date: Mon, 29 Mar 2021 22:43:37 +0000 Subject: [PATCH 04/19] Bump y18n from 3.2.1 to 4.0.1 Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 4.0.1. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] --- package-lock.json | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index fa9eff2bc..274c204f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ctemplar", - "version": "2.5.17", + "version": "2.5.20", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -19588,7 +19588,6 @@ "set-blocking": "^2.0.0", "string-width": "^1.0.2", "which-module": "^1.0.0", - "y18n": "^3.2.1", "yargs-parser": "^4.2.0" } } @@ -19645,11 +19644,6 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" - }, "yargs": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", @@ -24264,9 +24258,9 @@ "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==" }, "yallist": { "version": "4.0.0", From 9bb6be2c07ea2bd6e7f8a186525539d5218d4d80 Mon Sep 17 00:00:00 2001 From: Eli Jin Date: Tue, 30 Mar 2021 11:55:52 -0400 Subject: [PATCH 05/19] updated reactive validating on subscribe form --- .../users-billing-info.component.html | 12 ++++++++---- .../users-billing-info.component.ts | 10 +++++++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/app/shared/components/users-billing-info/users-billing-info.component.html b/src/app/shared/components/users-billing-info/users-billing-info.component.html index 77602f123..ad091c34d 100644 --- a/src/app/shared/components/users-billing-info/users-billing-info.component.html +++ b/src/app/shared/components/users-billing-info/users-billing-info.component.html @@ -164,14 +164,18 @@

- Required field * - + * + + + Required field + Number Only +
- * + *
@@ -190,7 +194,7 @@

- * + *
diff --git a/src/app/shared/components/users-billing-info/users-billing-info.component.ts b/src/app/shared/components/users-billing-info/users-billing-info.component.ts index 4a7846ec7..e3ff39fff 100644 --- a/src/app/shared/components/users-billing-info/users-billing-info.component.ts +++ b/src/app/shared/components/users-billing-info/users-billing-info.component.ts @@ -133,6 +133,10 @@ export class UsersBillingInfoComponent implements OnDestroy, OnInit { private btcTimer: Subscription; + get cardNumberFormControl() { return this.billingForm.get('cardNumber'); } + + get promoCodeFormControl() { return this.billingForm.get('promoCode'); } + constructor( private sharedService: SharedService, private store: Store, @@ -174,7 +178,7 @@ export class UsersBillingInfoComponent implements OnDestroy, OnInit { }); this.billingForm = this.formBuilder.group({ - cardNumber: ['', [Validators.minLength(16), Validators.maxLength(16)]], + cardNumber: ['', [Validators.required, Validators.pattern("^[0-9]*$"),]], promoCode: '', }); @@ -274,7 +278,7 @@ export class UsersBillingInfoComponent implements OnDestroy, OnInit { this.inProgress = true; (window).Stripe.card.createToken( { - number: this.cardNumber, + number: this.cardNumberFormControl.value, exp_month: this.expiryMonth, exp_year: this.expiryYear, cvc: this.cvc, @@ -481,7 +485,7 @@ export class UsersBillingInfoComponent implements OnDestroy, OnInit { checkStripeValidation() { this.stripePaymentValidation.message = ''; - if (!(window).Stripe.card.validateCardNumber(this.cardNumber)) { + if (!(window).Stripe.card.validateCardNumber(this.cardNumberFormControl.value)) { this.stripePaymentValidation.param = 'number'; } else if (!(window).Stripe.card.validateExpiry(this.expiryMonth, this.expiryYear)) { this.stripePaymentValidation.param = 'exp_year exp_month'; From d6a27cc6e52faeeec4951dbc7127f5e5ab8734cf Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 30 Mar 2021 16:03:10 +0000 Subject: [PATCH 06/19] Format code with prettier --- .../users-billing-info.component.html | 2 +- .../users-billing-info/users-billing-info.component.ts | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/shared/components/users-billing-info/users-billing-info.component.html b/src/app/shared/components/users-billing-info/users-billing-info.component.html index ad091c34d..7d9350484 100644 --- a/src/app/shared/components/users-billing-info/users-billing-info.component.html +++ b/src/app/shared/components/users-billing-info/users-billing-info.component.html @@ -166,7 +166,7 @@

* - + Required field Number Only diff --git a/src/app/shared/components/users-billing-info/users-billing-info.component.ts b/src/app/shared/components/users-billing-info/users-billing-info.component.ts index e3ff39fff..c0ed2415f 100644 --- a/src/app/shared/components/users-billing-info/users-billing-info.component.ts +++ b/src/app/shared/components/users-billing-info/users-billing-info.component.ts @@ -133,9 +133,13 @@ export class UsersBillingInfoComponent implements OnDestroy, OnInit { private btcTimer: Subscription; - get cardNumberFormControl() { return this.billingForm.get('cardNumber'); } + get cardNumberFormControl() { + return this.billingForm.get('cardNumber'); + } - get promoCodeFormControl() { return this.billingForm.get('promoCode'); } + get promoCodeFormControl() { + return this.billingForm.get('promoCode'); + } constructor( private sharedService: SharedService, @@ -178,7 +182,7 @@ export class UsersBillingInfoComponent implements OnDestroy, OnInit { }); this.billingForm = this.formBuilder.group({ - cardNumber: ['', [Validators.required, Validators.pattern("^[0-9]*$"),]], + cardNumber: ['', [Validators.required, Validators.pattern('^[0-9]*$')]], promoCode: '', }); From e2fe8fe7ea38e05bc2da75d61cfebe1cdda2f3d3 Mon Sep 17 00:00:00 2001 From: Eli Jin Date: Tue, 30 Mar 2021 13:15:52 -0400 Subject: [PATCH 07/19] update sidebar folder edit/remove --- .../mail-sidebar/mail-sidebar.component.html | 2 +- src/app/mail/mail.component.scss | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/app/mail/mail-sidebar/mail-sidebar.component.html b/src/app/mail/mail-sidebar/mail-sidebar.component.html index 24ad0517b..ad7be2758 100644 --- a/src/app/mail/mail-sidebar/mail-sidebar.component.html +++ b/src/app/mail/mail-sidebar/mail-sidebar.component.html @@ -140,7 +140,7 @@ {{ folder.name }} - {{ mailState?.unreadMailsCount[folder.name] }} + {{ mailState?.unreadMailsCount[folder.name] }}
diff --git a/src/app/mail/mail.component.scss b/src/app/mail/mail.component.scss index 49868b337..bedfedab4 100644 --- a/src/app/mail/mail.component.scss +++ b/src/app/mail/mail.component.scss @@ -301,6 +301,17 @@ opacity: 1; transform: translateX(-35px) translateY(-50%); + @include media('sm') { + display: none; + + .is-sidebar-expanded & { + display: block; + } + } + } + > .badge-hover-action { + transform: translateX(-40px) translateY(-50%); + @include media('sm') { display: none; @@ -376,6 +387,12 @@ } } + > .badge-hover-action { + transition-duration: 0.2s; + transition-timing-function: linear; + transition: transform 0.4s; + } + .mailbox-sidebar-nav-label { display: inline-block; width: 100%; From 8590af2df7d5eee918714a791e4a18cea307516d Mon Sep 17 00:00:00 2001 From: happyman125 Date: Wed, 31 Mar 2021 04:31:19 +0300 Subject: [PATCH 08/19] Specify timezone --- .../mail-autoresponder.component.html | 3 +++ .../mail-autoresponder.component.scss | 5 ++++ .../compose-mail/compose-mail.component.html | 14 +++++----- .../compose-mail/compose-mail.component.ts | 26 +++++++++++++++++++ 4 files changed, 42 insertions(+), 6 deletions(-) diff --git a/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.html b/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.html index 87553d333..61f855c24 100644 --- a/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.html +++ b/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.html @@ -7,6 +7,9 @@
+
+ +
diff --git a/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.scss b/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.scss index 9c18f12d5..bf6b7a495 100644 --- a/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.scss +++ b/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.scss @@ -1,3 +1,8 @@ ::ng-deep .ql-editor.ql-blank::before { color: var(--input-color-placeholder); } + +.autores-timezone { + margin: 0; + font-weight: bold; +} diff --git a/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.html b/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.html index 58c6107a3..b8ce8b615 100644 --- a/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.html +++ b/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.html @@ -485,11 +485,11 @@
{{ selfDestruct.error }}
@@ -546,11 +547,11 @@
{{ delayedDelivery.error }}
diff --git a/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.ts b/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.ts index bb2707c61..9fe6ece2e 100644 --- a/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.ts +++ b/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.ts @@ -306,6 +306,10 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnChanges, O isLoaded: boolean; + delayDeliverTimeString: string; + + selfDestructTimeString: string; + showEncryptFormErrors: boolean; isTrialPrimeFeaturesAvailable = false; @@ -1524,6 +1528,7 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnChanges, O this.selfDestruct.date, this.selfDestruct.time, ); + this.selfDestructTimeString = dateTimeString; if (this.dateTimeUtilService.isDateTimeInPast(dateTimeString)) { this.selfDestruct.error = 'Selected datetime is in past.'; } else { @@ -1536,6 +1541,16 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnChanges, O } } + changeSelfDestruct() { + if (this.selfDestruct.date && this.selfDestruct.time) { + const dateTimeString = this.dateTimeUtilService.createDateTimeStrFromNgbDateTimeStruct( + this.selfDestruct.date, + this.selfDestruct.time, + ); + this.selfDestructTimeString = dateTimeString; + } + } + clearSelfDestructValue() { this.resetSelfDestructValues(); this.closeSelfDestructModal(); @@ -1548,6 +1563,7 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnChanges, O this.delayedDelivery.date, this.delayedDelivery.time, ); + this.delayDeliverTimeString = dateTimeString; if (this.dateTimeUtilService.isDateTimeInPast(dateTimeString)) { this.delayedDelivery.error = 'Selected datetime is in past.'; } else { @@ -1560,6 +1576,16 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnChanges, O } } + changeDelayDeliver() { + if (this.delayedDelivery.date && this.delayedDelivery.time) { + const dateTimeString = this.dateTimeUtilService.createDateTimeStrFromNgbDateTimeStruct( + this.delayedDelivery.date, + this.delayedDelivery.time, + ); + this.delayDeliverTimeString = dateTimeString; + } + } + clearDelayedDeliveryValue() { this.resetDelayedDeliveryValues(); this.closeDelayedDeliveryModal(); From c5d3092a483c781ce9cf75ba8b6299e2559949bc Mon Sep 17 00:00:00 2001 From: happyman125 Date: Wed, 31 Mar 2021 12:45:19 +0300 Subject: [PATCH 09/19] use bootstrap classes instead of custom class --- .../mail-autoresponder/mail-autoresponder.component.html | 2 +- .../mail-autoresponder/mail-autoresponder.component.scss | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.html b/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.html index 61f855c24..b71c7ecb9 100644 --- a/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.html +++ b/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.html @@ -8,7 +8,7 @@
- +
diff --git a/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.scss b/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.scss index bf6b7a495..9c18f12d5 100644 --- a/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.scss +++ b/src/app/mail/mail-settings/mail-autoresponder/mail-autoresponder.component.scss @@ -1,8 +1,3 @@ ::ng-deep .ql-editor.ql-blank::before { color: var(--input-color-placeholder); } - -.autores-timezone { - margin: 0; - font-weight: bold; -} From 78e7d6022d832b155ca668974023d8d0ecbb3b29 Mon Sep 17 00:00:00 2001 From: Eli Jin Date: Wed, 31 Mar 2021 11:16:40 -0400 Subject: [PATCH 10/19] added managing for blacklist, whitelist on receiver chip --- .../mail-detail/mail-detail.component.html | 16 +++---- .../compose-mail/compose-mail.component.html | 6 +-- .../compose-mail/compose-mail.component.ts | 8 ++++ .../receiver-email-chip.component.html | 34 +++++++++++--- .../receiver-email-chip.component.ts | 46 ++++++++++++++++++- src/styles.scss | 32 +++++++++---- src/styles/_theme-variables-collection.scss | 9 +++- src/styles/base/_dark-variables.scss | 4 ++ src/styles/base/_light-variables.scss | 4 ++ 9 files changed, 131 insertions(+), 28 deletions(-) diff --git a/src/app/mail/mail-detail/mail-detail.component.html b/src/app/mail/mail-detail/mail-detail.component.html index 9cb48b816..2017cb9b5 100644 --- a/src/app/mail/mail-detail/mail-detail.component.html +++ b/src/app/mail/mail-detail/mail-detail.component.html @@ -214,7 +214,7 @@
  • {{ 'settings.compose.from' | translate }} - + @@ -223,7 +223,7 @@
    {{ 'settings.compose.to' | translate }} - + , @@ -232,7 +232,7 @@
    Cc: - + , @@ -241,7 +241,7 @@
    Bcc: - + , @@ -441,7 +441,7 @@
  • {{ 'settings.compose.from' | translate }} - + @@ -450,7 +450,7 @@
    {{ 'settings.compose.to' | translate }} - + , @@ -459,7 +459,7 @@
    Cc: - + , @@ -468,7 +468,7 @@
    Bcc: - + ,
  • diff --git a/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.html b/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.html index 58c6107a3..85dc6f11d 100644 --- a/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.html +++ b/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.html @@ -26,7 +26,7 @@ - + @@ -53,7 +53,7 @@ - + @@ -76,7 +76,7 @@ - + diff --git a/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.ts b/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.ts index bb2707c61..8f262fa18 100644 --- a/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.ts +++ b/src/app/mail/mail-sidebar/compose-mail/compose-mail.component.ts @@ -54,6 +54,8 @@ import { SecureContent, Settings, UserState, + BlackList, + WhiteList, } from '../../../store/datatypes'; import { Attachment, EncryptionNonCTemplar, Mail, Mailbox, MailFolderType } from '../../../store/models'; import { MailService, SharedService, getCryptoRandom } from '../../../store/services'; @@ -376,6 +378,10 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnChanges, O isPreparingToSendEmail = false; + blacklist: BlackList[] = []; + + whitelist: WhiteList[] = []; + /** * This variable will be used for pass to suggest to add to the contact or update */ @@ -471,6 +477,8 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnChanges, O this.userState = user; this.settings = user.settings; this.night_mode = this.settings.is_night_mode; + this.blacklist = this.userState.blackList; + this.whitelist = this.userState.whiteList; // Set html/plain version from user's settings. if ( (this.action === 'FORWARD' && this.is_html === undefined) || diff --git a/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.html b/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.html index 9de62dd6c..7e64fd8af 100644 --- a/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.html +++ b/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.html @@ -29,12 +29,7 @@
  • diff --git a/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.scss b/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.scss index 8638b4eb7..b63ed84d1 100644 --- a/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.scss +++ b/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.scss @@ -3,10 +3,10 @@ } .tag-chip-info:hover { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -ms-transform: scale(1.2); - -o-transform: scale(1.2); - transform: scale(1.2); + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); transform-origin: center center; } diff --git a/src/app/shared/pipes/email-formatting.pipe.ts b/src/app/shared/pipes/email-formatting.pipe.ts index 4840fa768..b97392a52 100644 --- a/src/app/shared/pipes/email-formatting.pipe.ts +++ b/src/app/shared/pipes/email-formatting.pipe.ts @@ -13,18 +13,27 @@ import { Pipe, PipeTransform } from '@angular/core'; name: 'emailFormat', }) export class EmailFormatPipe implements PipeTransform { - static transformToFormattedEmail(email: string, displayName: string = '', isHtmlFormat: boolean = false) { + + static transformToFormattedEmail(email: string, displayName: string = '', isHtmlFormat: boolean = false, isTruncate: boolean = false) { if (!email) return ''; + let formattedEmail = email.toLowerCase().trim(); if (!displayName || displayName === formattedEmail.split('@')[0]) { - return formattedEmail; + return isTruncate ? EmailFormatPipe.getTrucatedString(formattedEmail) : formattedEmail; } else if (isHtmlFormat) { - return `${displayName.trim()} <${formattedEmail}>`; + return isTruncate ? EmailFormatPipe.getTrucatedString(`${displayName.trim()} <${formattedEmail}>`) : `${displayName.trim()} <${formattedEmail}>`; } else { - return `${displayName.trim()} <${formattedEmail}>`; + return isTruncate ? EmailFormatPipe.getTrucatedString(`${displayName.trim()} <${formattedEmail}>`) : `${displayName.trim()} <${formattedEmail}>`; } } - transform(email: string, displayName: string = '', isHtmlFormat: boolean = false): string { - return EmailFormatPipe.transformToFormattedEmail(email, displayName, isHtmlFormat); + transform(email: string, displayName: string = '', isHtmlFormat: boolean = false, isTruncate: boolean = false): string { + return EmailFormatPipe.transformToFormattedEmail(email, displayName, isHtmlFormat, isTruncate); + } + static getTrucatedString(content: string): string { + const MAX_LENGTH_EMAIL = 40; + if (content.length > MAX_LENGTH_EMAIL) { + return content.slice(0, MAX_LENGTH_EMAIL) + '...'; + } + return content; } } From 89d9bcea482723a88d663635cf58ee66f7132e06 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Thu, 1 Apr 2021 15:17:28 +0000 Subject: [PATCH 15/19] Format code with prettier --- .../receiver-email-chip.component.html | 2 +- src/app/shared/pipes/email-formatting.pipe.ts | 25 ++++++++++++++----- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.html b/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.html index 255cde109..59ad530d8 100644 --- a/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.html +++ b/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.html @@ -34,7 +34,7 @@
    diff --git a/src/app/shared/pipes/email-formatting.pipe.ts b/src/app/shared/pipes/email-formatting.pipe.ts index b97392a52..5df93e051 100644 --- a/src/app/shared/pipes/email-formatting.pipe.ts +++ b/src/app/shared/pipes/email-formatting.pipe.ts @@ -13,20 +13,33 @@ import { Pipe, PipeTransform } from '@angular/core'; name: 'emailFormat', }) export class EmailFormatPipe implements PipeTransform { - - static transformToFormattedEmail(email: string, displayName: string = '', isHtmlFormat: boolean = false, isTruncate: boolean = false) { + static transformToFormattedEmail( + email: string, + displayName: string = '', + isHtmlFormat: boolean = false, + isTruncate: boolean = false, + ) { if (!email) return ''; - + let formattedEmail = email.toLowerCase().trim(); if (!displayName || displayName === formattedEmail.split('@')[0]) { return isTruncate ? EmailFormatPipe.getTrucatedString(formattedEmail) : formattedEmail; } else if (isHtmlFormat) { - return isTruncate ? EmailFormatPipe.getTrucatedString(`${displayName.trim()} <${formattedEmail}>`) : `${displayName.trim()} <${formattedEmail}>`; + return isTruncate + ? EmailFormatPipe.getTrucatedString(`${displayName.trim()} <${formattedEmail}>`) + : `${displayName.trim()} <${formattedEmail}>`; } else { - return isTruncate ? EmailFormatPipe.getTrucatedString(`${displayName.trim()} <${formattedEmail}>`) : `${displayName.trim()} <${formattedEmail}>`; + return isTruncate + ? EmailFormatPipe.getTrucatedString(`${displayName.trim()} <${formattedEmail}>`) + : `${displayName.trim()} <${formattedEmail}>`; } } - transform(email: string, displayName: string = '', isHtmlFormat: boolean = false, isTruncate: boolean = false): string { + transform( + email: string, + displayName: string = '', + isHtmlFormat: boolean = false, + isTruncate: boolean = false, + ): string { return EmailFormatPipe.transformToFormattedEmail(email, displayName, isHtmlFormat, isTruncate); } static getTrucatedString(content: string): string { From fd359ba4232f132882cf3bc99133ab4fae669400 Mon Sep 17 00:00:00 2001 From: Eli Jin Date: Thu, 1 Apr 2021 11:23:23 -0400 Subject: [PATCH 16/19] remove truncating on mail detail --- .../receiver-email-chip/receiver-email-chip.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.html b/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.html index 59ad530d8..05f5b1254 100644 --- a/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.html +++ b/src/app/mail/mail-sidebar/compose-mail/receiver-email-chip/receiver-email-chip.component.html @@ -21,7 +21,7 @@