From 12532f3cc422aeed88566cda855d9d7b6bab5655 Mon Sep 17 00:00:00 2001 From: addison Date: Wed, 10 Feb 2021 14:15:10 -0500 Subject: [PATCH] Allowed editing sends --- src/app/send/add-edit.component.html | 189 ++++++++++++++------------- src/app/send/add-edit.component.ts | 4 + src/app/send/send.component.html | 2 +- src/app/send/send.component.ts | 2 +- src/locales/en/messages.json | 15 +++ 5 files changed, 120 insertions(+), 92 deletions(-) diff --git a/src/app/send/add-edit.component.html b/src/app/send/add-edit.component.html index 47ef07cef05..2ce51ad731c 100644 --- a/src/app/send/add-edit.component.html +++ b/src/app/send/add-edit.component.html @@ -1,97 +1,106 @@ -
-
-
-
- {{'editSend' | i18n}} -
-
-
- - + +
+
+
+
+
+ {{'editSend' | i18n}} +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
-
- - +
+
+ {{'options' | i18n}} +
+
+
+ + +
{{'deletionDateDesc' | i18n}}
+
+
+ + +
{{'expirationDateDesc' | i18n}}
+
+
-
- - +
+
+
+ + +
{{'maxAccessCountDesc' | i18n}}
+
+
+ + +
+
-
- - +
+
+
+ + +
{{'sendPasswordDesc' | i18n}}
+
+
+
+
+
+ {{'notes' | i18n}} +
+
+
+ + {{'sendNotesDesc' | i18n}} +
+
+
+
+
+
+ + +
+
+
+
+
+ {{'share' | i18n}} +
+
+
+ + +
+
-
-
- {{'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 e32ea32c441..bc9ccaa254f 100644 --- a/src/app/send/add-edit.component.ts +++ b/src/app/send/add-edit.component.ts @@ -28,5 +28,9 @@ 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; } } diff --git a/src/app/send/send.component.html b/src/app/send/send.component.html index 2fd22a56281..ade3c8468aa 100644 --- a/src/app/send/send.component.html +++ b/src/app/send/send.component.html @@ -67,7 +67,7 @@
- +