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

Commit

Permalink
Merge pull request #1002 from CTemplar/dev
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
The-Hidden-Hand committed Feb 9, 2021
2 parents ca88bdd + 26f6024 commit e91e2ee
Show file tree
Hide file tree
Showing 72 changed files with 1,054 additions and 681 deletions.
24 changes: 23 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ctemplar",
"version": "2.5.12",
"version": "2.5.13",
"license": "Apache",
"main": "electron-main.js",
"description": "Angular webclient (with Linux, macOS and Windows desktop clients) for CTemplar's encrypted email service.",
Expand Down
27 changes: 19 additions & 8 deletions src/app/mail/mail-contact/mail-contact.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}

.mail-contact-header {
background: #f5f5f5;
background: var(--contacts-header-background);
border-radius: 2px 2px 0 0;

tr {
Expand Down Expand Up @@ -55,7 +55,7 @@
}

.mail-contact-body.is-bordered {
border: 1px solid #f5f5f5;
border: 1px solid var(--mail-row-border-bottom-color);
border-bottom: 0;

tr {
Expand Down Expand Up @@ -96,7 +96,7 @@
}

.mail-contact .mail-list-row {
border-color: #f5f5f5;
border-color: var(--mail-row-border-bottom-color);
font-size: 0.875rem;

@include media('<ipad', '>sm') {
Expand Down Expand Up @@ -186,6 +186,10 @@
// == Mail actions form
.mail-actions-form-title {
margin-bottom: 1.25rem;

.icon {
font-size: 0.75rem;
}
}

.mail-actions-form-holder {
Expand Down Expand Up @@ -295,10 +299,6 @@
margin-right: 0.625rem;
width: 2.75rem;
}

.icon {
font-size: 0.75rem;
}
}

.has-error .error-msg {
Expand Down Expand Up @@ -376,10 +376,21 @@
}
.modal-content-email {
white-space: pre-wrap;
background: #fff;
background: var(--bg-white);
padding: 1rem;
}
.mailbox-section {
height: calc(100vh - 118px);
overflow: auto;
}

.select-all-checkbox {
top: 4px;
}

::ng-deep .mat-checkbox .mat-checkbox-frame {
border: 2px solid var(--mat-checkbox-border-color);
}
::ng-deep .mat-checkbox .mat-checkbox-background {
border: var(--width-0-2) solid var(--mat-checkbox-border-color);
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
<div class="col-sm-10">
<input class="form-control form-control-sm" id="contactEmail" name="email" required [(ngModel)]="newContactModel.email" #contactEmail="ngModel" [placeholder]="'contacts.type_email' | translate" type="text" pattern="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$" />
</div>
<button type="button" class="add-button-link"><img src="assets/images/[email protected]" /></button>
</div>
</div>
<!-- Contact Encryption for InternalUsers-->
Expand Down Expand Up @@ -76,7 +75,6 @@
<div class="col-sm-10">
<input class="form-control form-control-sm" id="contactPhone1" name="phone" [(ngModel)]="newContactModel.phone" [placeholder]="'common.phone' | translate" type="text" />
</div>
<button type="button" class="add-button-link"><img src="assets/images/[email protected]" /></button>
</div>
</div>
<!-- Contact Phone Number 2-->
Expand All @@ -88,7 +86,6 @@
<div class="col-sm-10">
<input class="form-control form-control-sm" id="contactPhone2" [placeholder]="'common.phone' | translate" name="phone2" [(ngModel)]="newContactModel.phone2" type="text" />
</div>
<button type="button" class="add-button-link"><img src="assets/images/[email protected]" /></button>
</div>
</div>
<!-- Contact Address-->
Expand All @@ -100,7 +97,6 @@
<div class="col-sm-10">
<textarea class="form-control form-control-sm resize-off" id="contactAddress" [placeholder]="'contacts.address' | translate" name="address" [(ngModel)]="newContactModel.address" rows="3"></textarea>
</div>
<button type="button" class="add-button-link"><img src="assets/images/[email protected]" /></button>
</div>
</div>
<div class="mb-2 hidden-xs-down">&nbsp;</div>
Expand Down
17 changes: 6 additions & 11 deletions src/app/mail/mail-detail/mail-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ export class MailDetailComponent implements OnInit, OnDestroy {
this.mail.children &&
!this.mail.children.filter(child => child.id !== mail.id).some(child => child.folder === MailFolderType.TRASH)
) {
this.changeMailAfterDelete(this.currentMailIndex + 1);
this.goBackAfterDelete();
}
} else {
this.store.dispatch(
Expand Down Expand Up @@ -804,19 +804,14 @@ export class MailDetailComponent implements OnInit, OnDestroy {
this.mail.folder === MailFolderType.TRASH) ||
(mail.id === this.mail.id && this.mail.folder === MailFolderType.TRASH)
) {
this.changeMailAfterDelete(this.currentMailIndex + 1);
this.goBackAfterDelete();
}
}

changeMailAfterDelete(index: number) {
if (index < 0 || index >= this.mails.length) {
this.goBack(500);
}
goBackAfterDelete() {
this.goBack(500);
this.mail = null;
setTimeout(() => {
this.markedAsRead = false;
this.router.navigateByUrl(`/mail/${this.mailFolder}/page/${this.page}/message/${this.mails[index].id}`);
}, 500);
this.markedAsRead = false;
}

onDeleteForAll(mail: Mail) {
Expand All @@ -825,7 +820,7 @@ export class MailDetailComponent implements OnInit, OnDestroy {
this.mail.children = this.mail.children.filter(child => child.id !== mail.id);
}
if (mail.id === this.mail.id) {
this.changeMailAfterDelete(this.currentMailIndex + 1);
this.goBackAfterDelete();
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/app/mail/mail-footer/mail-footer.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
bottom: 0;
left: 0;
padding: 1.5rem 0.938rem;
background: $brand-white;
background: var(--bg-white);

@include media('>=ipad') {
padding: 0.5rem 1.563rem;
Expand All @@ -32,7 +32,7 @@
> a {
position: relative;
display: block;
color: $brand-gray;
color: var(--brand-gray);
&:hover {
color: $brand-primary;
}
Expand All @@ -42,7 +42,7 @@
top: 50%;
right: -0.5rem;
content: '';
border-right: 1px solid $brand-gray;
border-right: 1px solid var(--brand-gray);
height: 10px;
transform: translateY(-50%);
}
Expand Down
11 changes: 7 additions & 4 deletions src/app/mail/mail-header/mail-header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</div>
<!--Action buttons -->
<div class="col-sm-6 mailbox-navbar-col">
<ul class="mailbox-actions-menu d-flex justify-content-end">
<ul class="mailbox-actions-menu d-flex justify-content-end align-items-center">
<!--Protected by SRI button -->
<li>
<a href="https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity" target="_blank" rel="noopener noreferrer" class="sri-check" placement="bottom" ngbTooltip="Protected by SRI, click to read more">
Expand All @@ -38,7 +38,7 @@
<i class="far fa-question-circle"></i>
</button>
<div ngbDropdownMenu class="dropdown-menu-right text-center faq-dropdown" aria-labelledby="helpDropdownMenuButton">
<a class="dropdown-item text-left" target="_blank" rel="noopener noreferrer" href="{{ primaryWebsite }}/faqs/"> FAQs </a>
<a class="dropdown-item text-left" target="_blank" rel="noopener noreferrer" href="{{ primaryWebsite }}/help/"> Helpdesk </a>
<a class="dropdown-item text-left" (click)="openComposeMailDialog(['[email protected]'])" [innerHTML]="'settings.contact_support' | translate">Contact support </a>
</div>
</div>
Expand Down Expand Up @@ -71,8 +71,11 @@
<div class="form search-form">
<form>
<div class="form-group mb-0 position-relative">
<input class="form-control form-control-sm" type="text" [placeholder]="'mail_header.search' | translate" />
<button class="btn btn-sm btn-secondary search-btn" role="button">
<input class="form-control form-control-sm" type="text" [formControl]="searchInput" (keyup.enter)="search()" [placeholder]="'mail_header.search' | translate" />
<button class="clear-btn" *ngIf="searchInput.value?.length > 0" (click)="searchInput.setValue('')">
<i class="fas fa-times"></i>
</button>
<button class="btn btn-sm btn-secondary search-btn" (click)="search()" role="button">
<i class="icon icon-search"></i>
</button>
</div>
Expand Down
22 changes: 12 additions & 10 deletions src/app/mail/mail-header/mail-header.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
@import '../../../styles/vendors/include-media/include-media';
@import '../../../styles/config/include-media-config';
@import '../../../styles/vendors/ceaser/ceaser-easing';
@import '../../../styles/theme-variables-collection';
@import '../../../styles/themes';

// == Mailbox navbar
.mailbox-navbar {
position: relative;
padding: 0.5rem 0.938rem;
background-color: $brand-faded;
border: 1px solid $dropdown-border-color;
background-color: var(--brand-faded);
border: 1px solid var(--dropdown-border-color);
border-right: 0;
border-left: 0;

Expand Down Expand Up @@ -119,9 +121,9 @@

@include media('>sm') {
padding: 0.438rem 0.813rem;
background: $brand-white;
border: 1px solid $dropdown-border-color;
color: $brand-light-gray;
background: var(--dropdown-toggle-bg);
border: 1px solid var(--dropdown-border-color);
color: var(--brand-light-gray);
font-size: 1.25rem;

&.active,
Expand Down Expand Up @@ -156,7 +158,7 @@

a:hover,
.dropdown-toggle:hover {
background: $brand-faded;
background: var(--brand-faded);
// TODO: add scss variables files in refactor
color: #8a9095;
border-color: #8a9095;
Expand All @@ -179,7 +181,7 @@
.dropdown-toggle {
padding-top: 0.938rem;
padding-bottom: 0.938rem;
color: $brand-light-gray;
color: var(--brand-light-gray);
font-size: 0.875rem;
height: 3rem;
width: 4.625rem;
Expand Down Expand Up @@ -211,7 +213,7 @@

// == Search form
.search-form {
@include media('<ipad') {
@include media('<ipad', '>sm') {
width: 90%;
}

Expand Down Expand Up @@ -245,7 +247,7 @@
background: transparent;
border: 0;
cursor: pointer;

color: var(--text-dark);
i {
&:hover {
color: $brand-secondary;
Expand Down Expand Up @@ -278,7 +280,7 @@

.dropdown-menu {
position: absolute;
top: -0.5rem !important;
top: 0.2rem !important;
right: 0.938rem;
left: 0.938rem !important;
z-index: $zindex-default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@
<i class="icon icon-inbox"></i>
<span [translate]="'mail_sidebar.inbox'">Inbox</span>
</a>
<a class="dropdown-item" (click)="moveToFolder(mailFolderTypes.SENT)" *ngIf="mailFolder === mailFolderTypes.INBOX">
<i class="icon icon-paper-plane"></i>
<span [translate]="'mail_sidebar.sent'">Sent</span>
</a>
<ng-container *ngFor="let folder of customFolders; let i = index">
<a class="dropdown-item" *ngIf="mailFolder !== folder.name" (click)="moveToFolder(folder.name)">
<i class="folder-color-box icon" [style.background]="folder.color"></i>
Expand Down Expand Up @@ -143,7 +147,7 @@
</li>
<!-- Delete all messages permanently -->
<li *ngIf="(mailFolder === mailFolderTypes.TRASH || mailFolder === mailFolderTypes.SPAM) && mails?.length > 0">
<a (click)="openUseCacheConfirmDialog()" class="btn btn-sm delete-permanently-btn" placement="top" [ngbTooltip]="'mail_list.delete_messages' | translate">
<a (click)="confirmDeleteAll()" class="btn btn-sm delete-permanently-btn" placement="top" [ngbTooltip]="'mail_list.delete_messages' | translate">
<i class="icon icon-garbage position-left"></i>
<span [translate]="'mail_list.delete_all'"> Delete all permanently</span>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ a.disabled {
top: 8px;

::ng-deep .mat-checkbox .mat-checkbox-frame {
border-color: rgba(0, 0, 0, 0.38);
border: 2px solid var(--mat-checkbox-border-color);
}
::ng-deep .mat-checkbox .mat-checkbox-background {
border: var(--width-0-2) solid var(--mat-checkbox-border-color);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@import '~styles/vendors/include-media/include-media';
@import '~styles/config/include-media-config';
@import '~styles/vendors/ceaser/ceaser-easing';
@import '~styles/theme-variables-collection';
@import '~styles/themes';

.domain-body {
padding-left: 1.563rem;
Expand Down Expand Up @@ -126,7 +128,7 @@

&:hover {
opacity: 1;
background-color: $brand-faded;
background-color: var(--brand-faded);
color: #949494;
}
}
Expand All @@ -138,7 +140,7 @@
.stepper-form {
padding: 1.5625rem 1.875rem 2.5rem 1.875rem;
font-size: 0.875rem;
background-color: #fafafa;
background-color: var(--bg-faded);

.domain-input {
width: 28.125rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,6 @@ export class CustomDomainsComponent implements OnInit, OnDestroy {
}

gotoPricingPlans() {
this.onGotoTab.emit('dashboard-plans');
this.onGotoTab.emit('dashboard-and-plans');
}
}
Loading

0 comments on commit e91e2ee

Please sign in to comment.