Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Release #1658

Merged
merged 40 commits into from
Feb 18, 2022
Merged

Release #1658

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
849bb84
Update quotes.ts
The-Hidden-Hand Feb 10, 2022
d98f6f9
#1649 include have_attachment field in advance search
PrabhuSuriya Feb 10, 2022
7c584d1
#1649 fix advanced search checkbox
PrabhuSuriya Feb 10, 2022
b0e4beb
Bump karma from 5.0.9 to 6.3.14
dependabot[bot] Feb 11, 2022
9b9f244
Merge pull request #1653 from CTemplar/dependabot/npm_and_yarn/karma-…
The-Hidden-Hand Feb 11, 2022
d18bf0e
Merge pull request #1652 from PrabhuSuriya/1649-advanced-search-attac…
The-Hidden-Hand Feb 11, 2022
a9d1687
Format code with prettier
deepsource-autofix[bot] Feb 11, 2022
ac11f41
Bump follow-redirects from 1.14.7 to 1.14.8
dependabot[bot] Feb 12, 2022
82614c8
fix quotes typo
PrabhuSuriya Feb 12, 2022
aeee089
Merge pull request #1654 from CTemplar/deepsource-transform-26698a0d
The-Hidden-Hand Feb 14, 2022
d1f5834
Merge pull request #1655 from CTemplar/dependabot/npm_and_yarn/follow…
The-Hidden-Hand Feb 14, 2022
3c39651
Merge pull request #1656 from PrabhuSuriya/quotes-typo-fix
The-Hidden-Hand Feb 14, 2022
34595a7
hide [removed] @font-face
PrabhuSuriya Feb 14, 2022
94a34ed
Merge pull request #1659 from PrabhuSuriya/S462-hide-remove-fontface
The-Hidden-Hand Feb 14, 2022
c79f0bb
467 fix to show displayname<email> when forwarding plaintext
PrabhuSuriya Feb 15, 2022
eb9ec30
467 fix to to display when forwarding plaintext
PrabhuSuriya Feb 15, 2022
161fd2d
467 fix cc display when forwarding plaintext
PrabhuSuriya Feb 15, 2022
fa3003a
fix drag and drop for custom filters
PrabhuSuriya Feb 15, 2022
fb2a757
fix translation on selected condition on edit
PrabhuSuriya Feb 16, 2022
eb00fc6
add startswith translation key for filters
PrabhuSuriya Feb 16, 2022
9c47994
debounce the calls to analyzeUsersKeysWithContact to avoid switch bet…
PrabhuSuriya Feb 16, 2022
9ff1f57
Merge pull request #1660 from PrabhuSuriya/S467-display-email-on-forward
The-Hidden-Hand Feb 17, 2022
bafcc52
fix button alignments in mail view
PrabhuSuriya Feb 17, 2022
fbf7aa8
Bump url-parse from 1.5.3 to 1.5.7
dependabot[bot] Feb 17, 2022
055f5b8
Merge pull request #1665 from PrabhuSuriya/mail-body-view
The-Hidden-Hand Feb 18, 2022
a3c293d
Format code with prettier
deepsource-autofix[bot] Feb 18, 2022
a992e74
Format code with prettier
deepsource-autofix[bot] Feb 18, 2022
4dd26f6
Merge pull request #1661 from PrabhuSuriya/S472-dragdrop-filters
The-Hidden-Hand Feb 18, 2022
ca94d26
Format code with prettier
deepsource-autofix[bot] Feb 18, 2022
2925900
Merge pull request #1662 from PrabhuSuriya/S463-pgp_mime-attachement-…
The-Hidden-Hand Feb 18, 2022
9ef9d0c
Format code with prettier
deepsource-autofix[bot] Feb 18, 2022
a1ceba5
Merge pull request #1664 from CTemplar/dependabot/npm_and_yarn/url-pa…
The-Hidden-Hand Feb 18, 2022
7d1ff86
Merge pull request #1666 from CTemplar/deepsource-transform-dfdb252a
The-Hidden-Hand Feb 18, 2022
d075d34
Merge pull request #1667 from CTemplar/deepsource-transform-1b8f9659
The-Hidden-Hand Feb 18, 2022
25cb208
Merge pull request #1668 from CTemplar/deepsource-transform-f8a16c36
The-Hidden-Hand Feb 18, 2022
94a9435
Format code with prettier
deepsource-autofix[bot] Feb 18, 2022
e28cf9d
Merge pull request #1669 from CTemplar/deepsource-transform-257207ba
The-Hidden-Hand Feb 18, 2022
393df94
Merge pull request #1670 from CTemplar/deepsource-transform-886aa76a
The-Hidden-Hand Feb 18, 2022
6db6fb3
Version
The-Hidden-Hand Feb 18, 2022
8a4fe48
Merge branch 'dev' of github.com:ctemplar/webclient into dev
The-Hidden-Hand Feb 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
594 changes: 140 additions & 454 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ctemplar",
"version": "2.5.66",
"version": "2.5.67",
"license": "Apache",
"main": "electron-main.js",
"description": "Angular webclient (with Linux, macOS and Windows desktop clients) for CTemplar's encrypted email service.",
Expand Down Expand Up @@ -95,7 +95,7 @@
"husky": "^6.0.0",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma": "~6.3.14",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
.attachment-content {
padding-left: 25px;
}

.msg-reply-content {
overflow: auto;
}
28 changes: 21 additions & 7 deletions src/app/mail/mail-detail/mail-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1437,17 +1437,21 @@ export class MailDetailComponent implements OnInit, OnDestroy {
mail.receiver_display?.length > 0
? mail.receiver_display
.map(receiver =>
EmailFormatPipe.transformToFormattedEmail(receiver.email, receiver.name, true, mail.is_html !== false),
xss.escapeHtml(
EmailFormatPipe.transformToFormattedEmail(receiver.email, receiver.name, true, mail.is_html !== false),
),
)
.join(', ')
: mail.receiver.join(', ');
let content =
`</br>---------- Forwarded message ----------</br>` +
`From: ${EmailFormatPipe.transformToFormattedEmail(
mail.sender_display.email,
xss.escapeHtml(mail.sender_display.name),
true,
mail.is_html !== false,
`From: ${xss.escapeHtml(
EmailFormatPipe.transformToFormattedEmail(
mail.sender_display.email,
xss.escapeHtml(mail.sender_display.name),
true,
mail.is_html !== false,
),
)}</br>` +
`Date: ${
mail.sent_at
Expand All @@ -1458,7 +1462,17 @@ export class MailDetailComponent implements OnInit, OnDestroy {
`To: ${toHeaderString}</br>`;

if (mail.cc.length > 0) {
content += `CC: ${mail.cc.map(cc => `< ${cc} >`).join(', ')}</br>`;
const ccContent =
mail.cc_display?.length > 0
? mail.cc_display
.map(cc =>
xss.escapeHtml(
EmailFormatPipe.transformToFormattedEmail(cc.email, cc.name, true, mail.is_html !== false),
),
)
.join(', ')
: mail.cc.join(', ');
content += `CC: ${ccContent}</br>`;
}
content += `</br>${this.decryptedContents[mail.id]}</br>`;
content = SafePipe.sanitizeEmail(content, this.disableExternalImages);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ export class GenericFolderComponent implements OnInit, AfterViewInit {
this.advancedSearchQuery.size = parameters.size;
this.advancedSearchQuery.size_operator = parameters.size_operator;
this.advancedSearchQuery.exact = parameters.exact;
this.advancedSearchQuery.have_attachment = parameters.have_attachment;
this.store.dispatch(
new GetMails({
forceReload: true,
Expand Down
36 changes: 14 additions & 22 deletions src/app/mail/mail-settings/mail-filters/mail-filters.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,26 @@ <h5 class="ui-header-subtitle text-dark mb-0">
<span [translate]="'settings.set_priority'">Set Priority</span>
</button>
<ng-container *ngTemplateOutlet="setPriorityButtons"></ng-container>
<ul cdkDropList class="ui-list ui-list-styled list-styled" (cdkDropListDropped)="onFilterDrop($event)">
<li *ngFor="let filter of filters; let i = index" class="ui-list-item ui-list-item-xs-full" cdkDrag>
<ul
cdkDropList
[cdkDropListDisabled]="!inSetPriority"
class="ui-list ui-list-styled list-styled"
(cdkDropListDropped)="onFilterDrop($event)"
>
<li
*ngFor="let filter of filters; let i = index"
class="ui-list-item ui-list-item-xs-full"
[class.filter-drag-handle]="inSetPriority"
cdkDrag
cdkDragHandle
>
<div class="row row-xs align-items-center filter-item">
<div class="col-10 col-sm-8 show-ellipses">
<div class="drag-drop-handle" cdkDragHandle *ngIf="inSetPriority">
<i class="fas fa-arrows-alt-v"></i>
</div>
<span>
{{ filter.name }}
</span>
</div>
<div class="col-2 col-sm-4">
<div align="right" *ngIf="inSetPriority">
<i
class="fas fa-chevron-up cursor-pointer mr-2"
[class.hidden]="i === 0"
[ngbTooltip]="'settings.move_up' | translate"
(click)="priorityUp(i)"
>
</i>
<i
class="fas fa-chevron-down cursor-pointer"
[class.hidden]="i === filters.length - 1"
[ngbTooltip]="'settings.move_down' | translate"
(click)="priorityDown(i)"
>
</i>
</div>
<ul
*ngIf="!inSetPriority"
class="setting-actions-list d-flex align-items-center justify-content-end list-styled text-right"
Expand Down Expand Up @@ -193,7 +185,7 @@ <h3 class="modal-title w-100 text-dark" id="customFilterModalLabel">
role="button"
[disabled]="!condition.parameter"
>
{{ condition.condition_text }}
{{ condition.condition ? ('settings.filters.' + condition.condition | translate) : '' }}
</button>
<div ngbDropdownMenu aria-labelledby="filterConditionDropdownMenuBtn-{{ i }}">
<a (click)="onSelectAdvancedCondition(filterCondition.CONTAINS, i)" class="dropdown-item">
Expand Down
4 changes: 4 additions & 0 deletions src/app/mail/mail-settings/mail-settings.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -701,3 +701,7 @@ $error-red: #e94e4c;
.mat-checkbox-row {
height: 24px;
}

.filter-drag-handle {
cursor: move;
}
25 changes: 16 additions & 9 deletions src/app/mail/mail-sidebar/compose-mail/compose-mail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnDestroy {

_htmlQuotedMailContent: string;

analyzeUsersKeysWithContact$ = new Subject<boolean>();

public set htmlQuotedMailContent(value: string) {
if (!this._htmlQuotedMailContent) {
// store the initial HTML quoted mails
Expand Down Expand Up @@ -391,7 +393,7 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnDestroy {
}
this.draft = draft;
this.usersKeys = response.usersKeys;
this.analyzeUsersKeysWithContact();
this.analyzeUsersKeysWithContact$.next(true);
const receivers = this.draftMail?.receiver;
if (receivers && receivers.length > 0) {
const receiversToFetchKey = receivers
Expand Down Expand Up @@ -468,7 +470,7 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnDestroy {
this.clonedContacts =
contactsState.emailContacts === undefined ? contactsState.contacts : contactsState.emailContacts;
this.contactsState = contactsState;
this.analyzeUsersKeysWithContact();
this.analyzeUsersKeysWithContact$.next(true);
this.loadEmailContacts();
});

Expand Down Expand Up @@ -510,7 +512,7 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnDestroy {
this.selectedMailbox = mailBoxesState.currentMailbox;
}
this.mailBoxesState = mailBoxesState;
this.analyzeUsersKeysWithContact();
this.analyzeUsersKeysWithContact$.next(true);
});

/**
Expand All @@ -536,6 +538,11 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnDestroy {
}
});

// debounce the calls to analyzeUsersKeysWithContact to avoid switch between PGP_INLINE and PGP_MIME
this.analyzeUsersKeysWithContact$.pipe(debounceTime(500)).subscribe(() => {
this.analyzeUsersKeysWithContact();
});

const now = new Date();
this.datePickerMinDate = {
year: now.getFullYear(),
Expand Down Expand Up @@ -838,7 +845,7 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnDestroy {
break;
}
this.isSelfDestructionEnable();
this.analyzeUsersKeysWithContact();
this.analyzeUsersKeysWithContact$.next(true);
}

validateEmail(email: string) {
Expand All @@ -854,19 +861,19 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnDestroy {
onTagEdited($event: any) {
this.mailData.receiver[$event.index] = { display: $event.display, value: $event.value, email: $event.value };
this.isSelfDestructionEnable();
this.analyzeUsersKeysWithContact();
this.analyzeUsersKeysWithContact$.next(true);
}

ccOnTagEdited($event: any) {
this.mailData.cc[$event.index] = { display: $event.display, value: $event.value, email: $event.value };
this.isSelfDestructionEnable();
this.analyzeUsersKeysWithContact();
this.analyzeUsersKeysWithContact$.next(true);
}

bccOnTagEdited($event: any) {
this.mailData.bcc[$event.index] = { display: $event.display, value: $event.value, email: $event.value };
this.isSelfDestructionEnable();
this.analyzeUsersKeysWithContact();
this.analyzeUsersKeysWithContact$.next(true);
}
/**
* End Tag editing
Expand Down Expand Up @@ -1022,7 +1029,7 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnDestroy {
this.isSignatureAdded = false;
this.updateSignature();
this.valueChanged$.next(this.selectedMailbox);
this.analyzeUsersKeysWithContact();
this.analyzeUsersKeysWithContact$.next(true);
}

onImagesSelected(files: FileList) {
Expand Down Expand Up @@ -1951,7 +1958,7 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnDestroy {
);
}
this.valueChanged$.next(data);
this.analyzeUsersKeysWithContact();
this.analyzeUsersKeysWithContact$.next(true);
this.isSelfDestructionEnable();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@
[(ngModel)]="sameExactly"
[ngModelOptions]="{ standalone: true }"
>
Same exactly
</mat-checkbox>
<label for="sameExactly" class="fancy-field-empty">Same exactly</label>
</div>
<div class="col-6">
<mat-checkbox
Expand All @@ -249,8 +249,8 @@
[(ngModel)]="hasAttachment"
[ngModelOptions]="{ standalone: true }"
>
Has attachment
</mat-checkbox>
<label for="hasAttachment" class="fancy-field-empty">Has attachment</label>
</div>
</div>
<div class="d-flex justify-content-between mt-4">
Expand Down
4 changes: 2 additions & 2 deletions src/app/shared/pipes/safe.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class SafePipe implements PipeTransform {
return this.sanitizer.bypassSecurityTrustUrl(value);
case 'sanitize':
// Move style from style tag to inline style
value = juice(value);
value = juice(value, { preserveFontFaces: false, preserveMediaQueries: false });
// Sanitize Mail
value = SafePipe.processSanitizationForEmail(value, disableExternalImages);
return this.sanitizer.bypassSecurityTrustHtml(value);
Expand Down Expand Up @@ -365,7 +365,7 @@ export class SafePipe implements PipeTransform {
* @returns sanitized content
*/
static sanitizeEmail(value: string, disableExternalImages: boolean) {
value = juice(value);
value = juice(value, { preserveFontFaces: false, preserveMediaQueries: false });
// Sanitize Mail
value = SafePipe.processSanitizationForEmail(value, disableExternalImages);
return value;
Expand Down
4 changes: 0 additions & 4 deletions src/app/store/quotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,6 @@ export const quotes = [
content: 'Blind belief in authority is the greatest enemy of truth.',
author: '- Albert Einstein -',
},
{
content: "People can tell you to keep your mouth shut, but that doesn't stop you from having your own opinion.",
author: '- Anne Frank -',
},
{
content: 'Few are those who see with their own eyes and feel with their own hearts.',
author: '- Albert Einstein -',
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
"contains": "Contains",
"not_contains": "Does Not Contain",
"starts_with": "Starts With",
"startswith": "Starts With",
"not_startswith": "Does Not Starts With",
"endswith": "Ends With",
"not_endswith": "Does Not Ends With",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
"contains": "enthält",
"not_contains": "enthält nicht",
"starts_with": "beginnt mit",
"startswith": "beginnt mit",
"not_startswith": "beginnt nich tmit",
"endswith": "endet mit",
"not_endswith": "endet nicht mit",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
"contains": "contains",
"not_contains": "doesn't contain",
"starts_with": "starts with",
"startswith": "starts with",
"not_startswith": "doesn't start with",
"endswith": "ends with",
"not_endswith": "doesn't end with",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
"contains": "Contains",
"not_contains": "Does Not Contain",
"starts_with": "starts with",
"startswith": "starts with",
"not_startswith": "Does Not Starts With",
"endswith": "Ends With",
"not_endswith": "Does Not Ends With",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
"contains": "Contains",
"not_contains": "Does Not Contain",
"starts_with": "Commence par",
"startswith": "Commence par",
"not_startswith": "Does Not Starts With",
"endswith": "Ends With",
"not_endswith": "Does Not Ends With",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
"contains": "Contains",
"not_contains": "Does Not Contain",
"starts_with": "inizia con",
"startswith": "inizia con",
"not_startswith": "Does Not Starts With",
"endswith": "Ends With",
"not_endswith": "Does Not Ends With",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
"contains": "含む",
"not_contains": "含まない",
"starts_with": "~で始まる",
"startswith": "~で始まる",
"not_startswith": "~で始まらない",
"endswith": "~で終わる",
"not_endswith": "~で終わらない",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
"contains": "Contains",
"not_contains": "Does Not Contain",
"starts_with": "zaczyna się na",
"startswith": "zaczyna się na",
"not_startswith": "Does Not Starts With",
"endswith": "Ends With",
"not_endswith": "Does Not Ends With",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
"contains": "Contains",
"not_contains": "Does Not Contain",
"starts_with": "começa com",
"startswith": "começa com",
"not_startswith": "Does Not Starts With",
"endswith": "Ends With",
"not_endswith": "Does Not Ends With",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/ro.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
"contains": "Contains",
"not_contains": "Does Not Contain",
"starts_with": "începe cu",
"startswith": "începe cu",
"not_startswith": "Does Not Starts With",
"endswith": "Ends With",
"not_endswith": "Does Not Ends With",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
"contains": "Contains",
"not_contains": "Does Not Contain",
"starts_with": "начинается с",
"startswith": "начинается с",
"not_startswith": "Does Not Starts With",
"endswith": "Ends With",
"not_endswith": "Does Not Ends With",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
"contains": "içeriyorsa",
"not_contains": "içermiyorsa",
"starts_with": "ile başlıyorsa",
"startswith": "ile başlıyorsa",
"not_startswith": "ile başlamıyorsa",
"endswith": "bu şekilde bitiyorsa",
"not_endswith": "bu şekilde bitmiyorsa",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
"contains": "Contains",
"not_contains": "Does Not Contain",
"starts_with": "починається з",
"startswith": "починається з",
"not_startswith": "Does Not Starts With",
"endswith": "Ends With",
"not_endswith": "Does Not Ends With",
Expand Down
Loading