From 1290ff2c40d2ad9d4d8e84ecff9bc2a49d82ace2 Mon Sep 17 00:00:00 2001 From: addison Date: Tue, 16 Feb 2021 11:52:23 -0500 Subject: [PATCH] finished CRUD operations for Send --- jslib | 2 +- src/app/send/add-edit.component.html | 205 +++++++++++++++++---------- src/app/send/add-edit.component.ts | 7 +- src/app/send/send.component.html | 3 +- src/app/send/send.component.ts | 48 +++++-- src/locales/en/messages.json | 33 +++++ src/scss/box.scss | 23 ++- 7 files changed, 230 insertions(+), 91 deletions(-) diff --git a/jslib b/jslib index ee164bebc6..7941664a59 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit ee164bebc65aa56e41a122eb4ece8971eb23119b +Subproject commit 7941664a59f90a1b510b13d37062b90210da3b3c diff --git a/src/app/send/add-edit.component.html b/src/app/send/add-edit.component.html index 2ce51ad731..719d90e7f9 100644 --- a/src/app/send/add-edit.component.html +++ b/src/app/send/add-edit.component.html @@ -1,106 +1,159 @@ - -
-
-
-
-
- {{'editSend' | i18n}} + +
+
+
+
+ {{title}} +
+
+
+ +
-
-
- - +
+
+
+
+ +
+ +
+ + +
-
+
+ + +
{{'sendFileDesc' | i18n}} {{'maxFileSize' | i18n}}
+
+ + +
+
+
- + +
{{'sendTextDesc' | i18n}}
+
+
+
+
+
+ {{'options' | i18n}} +
+
+
+ + + +
{{'deletionDateDesc' | i18n}}
+
+
+ +
+
+ + + +
{{'expirationDateDesc' | i18n}}
+
+
+
-
-
- {{'options' | i18n}} +
+
+
+
+ + +
{{'maxAccessCountDesc' | i18n}}
-
-
- - -
{{'deletionDateDesc' | i18n}}
-
-
- - -
{{'expirationDateDesc' | i18n}}
-
+
+ +
-
-
-
- - -
{{'maxAccessCountDesc' | i18n}}
-
-
- - -
+
+
+
+
+ + +
{{'sendPasswordDesc' | i18n}}
-
-
-
- - -
{{'sendPasswordDesc' | i18n}}
-
+
+
+
+ {{'notes' | i18n}} +
+
+
+ + {{'sendNotesDesc' | i18n}}
-
-
- {{'notes' | i18n}} -
-
-
- - {{'sendNotesDesc' | i18n}} -
+
+
+
+
+ +
-
-
-
- - -
-
+
+
+
+ {{'share' | i18n}}
-
-
- {{'share' | i18n}} -
-
-
- - -
+
+
+ +
- + + diff --git a/src/app/send/add-edit.component.ts b/src/app/send/add-edit.component.ts index bc9ccaa254..e657bcd9c2 100644 --- a/src/app/send/add-edit.component.ts +++ b/src/app/send/add-edit.component.ts @@ -28,9 +28,14 @@ export class AddEditComponent extends BaseAddEditComponent { async refresh() { const send = await this.loadSend(); this.send = await send.decrypt(); + this.hasPassword = this.send.password != null && this.send.password.trim() !== ''; + this.deletionDate = this.dateToString(this.send.deletionDate); this.expirationDate = this.dateToString(this.send.expirationDate); - this.password = null; + } + + cancel() { + this.onCancelled.emit(this.send); } } diff --git a/src/app/send/send.component.html b/src/app/send/send.component.html index ade3c8468a..ab7b419dec 100644 --- a/src/app/send/send.component.html +++ b/src/app/send/send.component.html @@ -67,7 +67,8 @@
- +