From 30a7db2f20cbfed8506445d731659533988fc96d Mon Sep 17 00:00:00 2001 From: addison Date: Tue, 9 Feb 2021 15:57:10 -0500 Subject: [PATCH 1/2] Added support for viewing Sends' --- jslib | 2 +- src/app/send/add-edit.component.html | 92 ++++++++++++++++++++++++++-- src/app/send/add-edit.component.ts | 12 +++- src/app/send/send.component.html | 4 +- src/app/send/send.component.ts | 27 ++++++-- src/locales/en/messages.json | 51 ++++++++++++++- src/scss/box.scss | 3 + src/scss/misc.scss | 8 +++ src/scss/variables.scss | 3 + 9 files changed, 185 insertions(+), 17 deletions(-) diff --git a/jslib b/jslib index a16d8f7de7..ee164bebc6 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit a16d8f7de7abe63532bcf7452cb7517f9174189a +Subproject commit ee164bebc65aa56e41a122eb4ece8971eb23119b diff --git a/src/app/send/add-edit.component.html b/src/app/send/add-edit.component.html index d7a8fdcf14..47ef07cef0 100644 --- a/src/app/send/add-edit.component.html +++ b/src/app/send/add-edit.component.html @@ -1,13 +1,95 @@ -
+
- {{'sendInformation' | i18n}} + {{'editSend' | i18n}}
-
- {{'name' | i18n}} - {{send.name}} +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ {{'options' | i18n}} +
+
+
+ + +
{{'deletionDateDesc' | i18n}}
+
+
+ + +
{{'expirationDateDesc' | i18n}}
+
+
+
+
+
+
+ + +
{{'maxAccessCountDesc' | i18n}}
+
+
+ + +
+
+
+
+
+
+ + +
{{'sendPasswordDesc' | i18n}}
+
+
+
+
+
+ {{'notes' | i18n}} +
+
+
+ + {{'sendNotesDesc' | i18n}} +
+
+
+
+
+
+ + +
+
+
+
+
+ {{'share' | i18n}} +
+
+
+ +
diff --git a/src/app/send/add-edit.component.ts b/src/app/send/add-edit.component.ts index bbffa41ba4..e32ea32c44 100644 --- a/src/app/send/add-edit.component.ts +++ b/src/app/send/add-edit.component.ts @@ -1,11 +1,12 @@ import { DatePipe } from '@angular/common'; -import { Component } from '@angular/core'; +import { Component, Input } from '@angular/core'; import { EnvironmentService } from 'jslib/abstractions/environment.service'; import { I18nService } from 'jslib/abstractions/i18n.service'; import { MessagingService } from 'jslib/abstractions/messaging.service'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; +import { PolicyService } from 'jslib/abstractions/policy.service'; import { SendService } from 'jslib/abstractions/send.service'; import { UserService } from 'jslib/abstractions/user.service'; @@ -19,8 +20,13 @@ export class AddEditComponent extends BaseAddEditComponent { constructor(i18nService: I18nService, platformUtilsService: PlatformUtilsService, environmentService: EnvironmentService, datePipe: DatePipe, sendService: SendService, userService: UserService, - messagingService: MessagingService) { + messagingService: MessagingService, policyService: PolicyService) { super(i18nService, platformUtilsService, environmentService, - datePipe, sendService, userService, messagingService); + datePipe, sendService, userService, messagingService, policyService); + } + + async refresh() { + const send = await this.loadSend(); + this.send = await send.decrypt(); } } diff --git a/src/app/send/send.component.html b/src/app/send/send.component.html index 9315c4e6a4..2fd22a5628 100644 --- a/src/app/send/send.component.html +++ b/src/app/send/send.component.html @@ -41,7 +41,7 @@
- +