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

v1.1.8 #333

Merged
merged 20 commits into from
Dec 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
416f6b6
DEV-435 add dropdown to switch between 12-hour and 24-hour time forma…
Waseem826 Dec 2, 2018
dcad66b
Merge pull request #327 from CTemplar/feature/DEV-435-switch-between-…
atifsaddique211f Dec 2, 2018
984b160
DEV-333 update account creation image
atifsaddique211f Dec 2, 2018
273c679
Merge branch 'dev' of https://github.com/CTemplar/webclient into dev
atifsaddique211f Dec 2, 2018
b354a9f
DEV-189 move list of available fonts to `config`
Waseem826 Dec 2, 2018
9987161
DEV-189 add new "General" setting to save default font for mail compose
Waseem826 Dec 2, 2018
fe23288
DEV-189 set quill font to `default_font` in settings
Waseem826 Dec 2, 2018
8074edb
DEV-335 hide unread count from all folders except inbox and custom fo…
Waseem826 Dec 2, 2018
96b89f0
Merge pull request #328 from CTemplar/feature/DEV-189-change-default-…
atifsaddique211f Dec 3, 2018
fd20ae4
DEV-361 add custom quill clipboard matcher to convert links in pasted…
Waseem826 Dec 3, 2018
8b31376
Merge branch 'dev' into feature/DEV-361-copy-paste-active-link
Waseem826 Dec 3, 2018
89e8194
DEV-462 remove message content from message summary and always displa…
Waseem826 Dec 3, 2018
3b2f9fb
DEV-462 minor bug fix
Waseem826 Dec 3, 2018
d65215b
Merge pull request #329 from CTemplar/feature/DEV-361-copy-paste-acti…
atifsaddique211f Dec 3, 2018
b196da8
Merge pull request #330 from CTemplar/fix/DEV-462-message-content-in-…
atifsaddique211f Dec 3, 2018
4d44461
DEV-335 show outbox counters of delayed delivery and deadman timer
atifsaddique211f Dec 4, 2018
64ed2a8
Merge pull request #331 from CTemplar/feature/DEV-335-timer-display-c…
atifsaddique211f Dec 4, 2018
5668852
DEV-463 update post on front page
atifsaddique211f Dec 4, 2018
ca45326
DEV-333 fix account creation animation order
atifsaddique211f Dec 4, 2018
66704e1
DEV-464 Add reddit link in footer
atifsaddique211f Dec 4, 2018
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
2 changes: 1 addition & 1 deletion src/app/blog/shared/blog-grid/blog-grid.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<img alt="News thumbnail" class="img news-img" (load)="post.isLoaded = true" [hidden]="!post.isLoaded" src="{{ post.image_card }}"/>
</figure>
<h4 class="news-card-title">{{post.name}}</h4>
<p>{{post.text}}</p>
<div [innerHtml]="post.text"></div>
</div>
<footer class="news-card-footer">
<ul class="news-meta-list">
Expand Down
3 changes: 3 additions & 0 deletions src/app/footer/footer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ <h4 class="footer-widget-title" translate="footer.social">Social</h4>
<li>
<a href="https://www.linkedin.com/company/ctemplarencryption/" target="_blank">LinkedIn</a>
</li>
<li>
<a href="https://www.reddit.com/r/ctemplar/" target="_blank">Reddit</a>
</li>
</ul>
</div>
</div>
Expand Down
79 changes: 34 additions & 45 deletions src/app/mail/mail-detail/mail-detail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,30 +156,24 @@ <h5 class="ui-header-subtitle text-dark mb-0">
<span class="text-secondary"> </span>
<a class="text-gray-dark text-muted">&lt;{{mail.sender}}&gt;</a>
</li>
<li *ngIf="parentMailCollapsed && decryptedContents[mail.id]">
<p class="clipped-content" [innerHTML]="decryptedContents[mail.id] | safe: 'html': mail.sender"> </p>
<li id="{{mail.id}}-mail-to">
To:
<ng-container *ngFor="let receiver of mail.receiver; let i = index;">
<span class="text-secondary"> </span>
<a class="text-muted">&lt;{{receiver}}&gt;</a>
<!--Comma as a separator-->
<span *ngIf=" i < mail.receiver?.length-1">, </span>
</ng-container>
</li>
<li *ngIf="mail.cc?.length>0" id="{{mail.id}}-mail-cc">
CC:
<ng-container *ngFor="let cc of mail.cc; let i = index;">
<span class="text-secondary"> </span>
<a class="text-muted">&lt;{{cc}}&gt;</a>
<!--Comma as a separator-->
<span *ngIf=" i < mail.cc?.length-1">, </span>
</ng-container>
</li>
<ng-container *ngIf="!parentMailCollapsed">
<li id="{{mail.id}}-mail-to">
To:
<ng-container *ngFor="let receiver of mail.receiver; let i = index;">
<span class="text-secondary"> </span>
<a class="text-muted">&lt;{{receiver}}&gt;</a>
<!--Comma as a separator-->
<span *ngIf=" i < mail.receiver?.length-1">, </span>
</ng-container>
</li>
<li *ngIf="mail.cc?.length>0" id="{{mail.id}}-mail-cc">
CC:
<ng-container *ngFor="let cc of mail.cc; let i = index;">
<span class="text-secondary"> </span>
<a class="text-muted">&lt;{{cc}}&gt;</a>
<!--Comma as a separator-->
<span *ngIf=" i < mail.cc?.length-1">, </span>
</ng-container>
</li>
</ng-container>

</ul>
</div>
</div>
Expand Down Expand Up @@ -275,29 +269,24 @@ <h5 class="ui-header-subtitle text-dark mb-0">
<span class="text-secondary"> </span>
<a class="text-muted text-gray-dark">&lt;{{childMail.sender}}&gt;</a>
</li>
<li *ngIf="childMailCollapsed[childIndex] && decryptedContents[childMail.id]">
<p class="clipped-content" [innerHTML]="decryptedContents[childMail.id] | safe: 'html': childMail.sender"> </p>
<li id="{{childMail.id}}-mail-to">
To:
<ng-container *ngFor="let receiver of childMail.receiver; let i = index;">
<span class="text-secondary"> </span>
<a class="text-muted">&lt;{{receiver}}&gt;</a>
<!--Comma as a separator-->
<span *ngIf=" i < childMail.receiver?.length-1">, </span>
</ng-container>
</li>
<li *ngIf="childMail.cc?.length>0" id="{{childMail.id}}-mail-cc">
CC:
<ng-container *ngFor="let cc of childMail.cc; let i = index;">
<span class="text-secondary"> </span>
<a class="text-muted">&lt;{{cc}}&gt;</a>
<!--Comma as a separator-->
<span *ngIf=" i < childMail.cc?.length-1">, </span>
</ng-container>
</li>
<ng-container *ngIf="!childMailCollapsed[childIndex]">
<li id="{{childMail.id}}-mail-to">
To:
<ng-container *ngFor="let receiver of childMail.receiver; let i = index;">
<span class="text-secondary"> </span>
<a class="text-muted">&lt;{{receiver}}&gt;</a>
<!--Comma as a separator-->
<span *ngIf=" i < childMail.receiver?.length-1">, </span>
</ng-container>
</li>
<li *ngIf="childMail.cc?.length>0" id="{{childMail.id}}-mail-cc">
CC:
<ng-container *ngFor="let cc of childMail.cc; let i = index;">
<span class="text-secondary"> </span>
<a class="text-muted">&lt;{{cc}}&gt;</a>
<!--Comma as a separator-->
<span *ngIf=" i < childMail.cc?.length-1">, </span>
</ng-container>
</li>
</ng-container>
</ul>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/mail/mail-detail/mail-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class MailDetailComponent implements OnInit, OnDestroy {
if (!this.mailOptions[this.mail.id]) {
this.mailOptions[this.mail.id] = {};
}
if (this.mail.children) {
if (this.mail.children && this.mail.children.length > 0) {
this.parentMailCollapsed = true;
// Collapse all emails by default
this.childMailCollapsed.fill(true, 0, this.mail.children.length);
Expand Down
23 changes: 23 additions & 0 deletions src/app/mail/mail-settings/mail-settings.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,29 @@ <h5 class="ui-header-subtitle text-dark mb-0"><strong translate="settings.genera
</div>
</div>
</div>
<div class="form-content-row">
<div class="row align-items-center">
<div class="col-sm-5">
<label class="form-label mb-0">Default Mail Compose Font</label>
</div>
<div class="col-sm-7">
<div class="btn-dropdown btn-dropdown-select">
<div ngbDropdown class="dropdown-sm">
<button ngbDropdownToggle class="text-capitalize" role="button" id="defaultFontDropdownMenuButton">
{{settings.default_font}}
</button>
<div ngbDropdownMenu aria-labelledby="defaultFontDropdownMenuButton">
<a class="dropdown-item text-capitalize" *ngFor="let font of fonts"
(click)="updateSettings('default_font', font)">
{{font}}
</a>
</div>
</div>
</div>
</div>
</div>
</div>


<!-- Will be used later -->
<div class="form-content-row" *ngIf="false">
Expand Down
3 changes: 2 additions & 1 deletion src/app/mail/mail-settings/mail-settings.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Store } from '@ngrx/store';
import { OnDestroy, TakeUntilDestroy } from 'ngx-take-until-destroy';
import { Observable } from 'rxjs/Observable';
import { debounceTime } from 'rxjs/operators';
import { DEFAULT_EMAIL_ADDRESS, DEFAULT_STORAGE, Language, LANGUAGES, VALID_EMAIL_REGEX } from '../../shared/config';
import { DEFAULT_EMAIL_ADDRESS, DEFAULT_STORAGE, Language, LANGUAGES, VALID_EMAIL_REGEX, FONTS } from '../../shared/config';

import {
BlackListDelete,
Expand Down Expand Up @@ -44,6 +44,7 @@ export class MailSettingsComponent implements OnInit, OnDestroy {
readonly destroyed$: Observable<boolean>;
readonly defaultStorage = DEFAULT_STORAGE;
readonly defaultEmailAddress = DEFAULT_EMAIL_ADDRESS;
readonly fonts = FONTS;

@ViewChild('changePasswordModal') changePasswordModal;
@ViewChild('deleteAccountInfoModal') deleteAccountInfoModal;
Expand Down
68 changes: 29 additions & 39 deletions src/app/mail/mail-sidebar/compose-mail/compose-mail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,43 +176,9 @@
aria-labelledby="typoFamilyDropdownMenu">
<div class="typo-holder">
<ul class="typo-list list-styled">
<li>
<button value="hiragino-sans"
class="ql-font typo-select-link">Hiragino
Sans
</button>
</li>
<li>
<button value="lato"
class="ql-font typo-select-link">Lato
</button>
</li>
<li>
<button value="roboto"
class="ql-font typo-select-link">Roboto
</button>
</li>
<li>
<button value="abril-fatface"
class="ql-font typo-select-link">Abril
Fatface
</button>
</li>
<li>
<button value="andale-mono"
class="ql-font typo-select-link">Andale Mono
</button>
</li>
<li>
<button value="arial"
class="ql-font typo-select-link">Arial
</button>
</li>
<li>
<button value="times-new-roman"
class="ql-font typo-select-link">Times New
Roman
</button>
<li *ngFor="let font of fonts">
<button [value]="font" class="ql-font typo-select-link text-capitalize">
{{font}}</button>
</li>
</ul>
</div>
Expand Down Expand Up @@ -514,7 +480,19 @@ <h3 class="modal-title w-100 text-dark"><strong>Self Destruct Email</strong></h3
</div>
<div class="form-group">
<label class="form-inline">Select Time</label>
<ngb-timepicker [(ngModel)]="selfDestruct.time"></ngb-timepicker>
<div class="btn-dropdown btn-dropdown-select btn-dropdown-lg col-4 p-0">
<div ngbDropdown class="dropdown-sm">
<button ngbDropdownToggle class="dropdown-toggle border-0 from-text"
id="selfDestructMeridianDropdownMenuButton" role="button">
{{selfDestruct.meridian ? '12 Hour' : '24 Hour'}}
</button>
<div ngbDropdownMenu aria-labelledby="selfDestructMeridianDropdownMenuButton">
<a class="dropdown-item from-text" (click)="selfDestruct.meridian = true">12 Hour</a>
<a class="dropdown-item from-text" (click)="selfDestruct.meridian = false">24 Hour</a>
</div>
</div>
</div>
<ngb-timepicker [(ngModel)]="selfDestruct.time" [meridian]="selfDestruct.meridian"></ngb-timepicker>
</div>
<div *ngIf="selfDestruct.error" class="l-alert l-alert-danger mb-3">
{{selfDestruct.error}}
Expand Down Expand Up @@ -553,7 +531,19 @@ <h3 class="modal-title w-100 text-dark"><strong>Delayed Delivery</strong></h3>
</div>
<div class="form-group">
<label class="form-inline">Select Time</label>
<ngb-timepicker [(ngModel)]="delayedDelivery.time"></ngb-timepicker>
<div class="btn-dropdown btn-dropdown-select btn-dropdown-lg col-4 p-0">
<div ngbDropdown class="dropdown-sm">
<button ngbDropdownToggle class="dropdown-toggle border-0 from-text"
id="delayedDeliveryMeridianDropdownMenuButton" role="button">
{{delayedDelivery.meridian ? '12 Hour': '24 Hour'}}
</button>
<div ngbDropdownMenu aria-labelledby="delayedDeliveryMeridianDropdownMenuButton">
<a class="dropdown-item from-text" (click)="delayedDelivery.meridian = true">12 Hour</a>
<a class="dropdown-item from-text" (click)="delayedDelivery.meridian = false">24 Hour</a>
</div>
</div>
</div>
<ngb-timepicker [(ngModel)]="delayedDelivery.time" [meridian]="delayedDelivery.meridian"></ngb-timepicker>
</div>
<div *ngIf="delayedDelivery.error" class="l-alert l-alert-danger mb-3">
{{delayedDelivery.error}}
Expand Down
36 changes: 32 additions & 4 deletions src/app/mail/mail-sidebar/compose-mail/compose-mail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Observable } from 'rxjs/Observable';
import { debounceTime } from 'rxjs/operators/debounceTime';
import { Subject } from 'rxjs/Subject';
import { Subscription } from 'rxjs/Subscription';
import { COLORS, ESCAPE_KEYCODE, VALID_EMAIL_REGEX } from '../../../shared/config';
import { COLORS, FONTS, ESCAPE_KEYCODE, VALID_EMAIL_REGEX } from '../../../shared/config';
import { FilenamePipe } from '../../../shared/pipes/filename.pipe';
import { FilesizePipe } from '../../../shared/pipes/filesize.pipe';
import {
Expand All @@ -32,9 +32,7 @@ import { OpenPgpService } from '../../../store/services/openpgp.service';
const Quill: any = QuillNamespace;

const FontAttributor = Quill.import('attributors/style/font');
FontAttributor.whitelist = [
'hiragino-sans', 'lato', 'roboto', 'abril-fatface', 'andale-mono', 'arial', 'times-new-roman'
];
FontAttributor.whitelist = [...FONTS];
Quill.register(FontAttributor, true);

const SizeAttributor = Quill.import('attributors/style/size');
Expand Down Expand Up @@ -136,6 +134,7 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnDestroy {

draftId: number;
colors = COLORS;
fonts = FONTS;
mailData: any = {};
options: any = {};
selfDestruct: any = {};
Expand Down Expand Up @@ -322,6 +321,30 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnDestroy {
toolbar: this.toolbar.nativeElement
}
});
this.quill.clipboard.addMatcher(Node.TEXT_NODE, (node, delta) => {
const regex = /https?:\/\/[^\s]+/g;
if (typeof (node.data) !== 'string') {
return;
}
const matches = node.data.match(regex);

if (matches && matches.length > 0) {
const ops = [];
let str = node.data;
matches.forEach((match) => {
const split = str.split(match);
const beforeLink = split.shift();
ops.push({ insert: beforeLink });
ops.push({ insert: match, attributes: { link: match } });
str = split.join(match);
});
ops.push({ insert: str });
delta.ops = ops;
}
return delta;
});

this.quill.format('font', this.userState.settings.default_font);
this.quill.getModule('toolbar').addHandler('image', () => {
this.quillImageHandler();
});
Expand Down Expand Up @@ -834,6 +857,9 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnDestroy {
}

private resetMailData() {
this.resetSelfDestructValues();
this.resetDelayedDeliveryValues();
this.resetDeadManTimerValues();
this.mailData = {
receiver: this.receivers ?
this.receivers.map(receiver => ({ display: receiver, value: receiver })) :
Expand Down Expand Up @@ -867,6 +893,7 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnDestroy {
minute: 0,
second: 0
};
this.selfDestruct.meridian = true;
this.selfDestruct.error = null;
}

Expand All @@ -878,6 +905,7 @@ export class ComposeMailComponent implements OnInit, AfterViewInit, OnDestroy {
minute: 0,
second: 0
};
this.delayedDelivery.meridian = true;
this.delayedDelivery.error = null;
}

Expand Down
Loading