From ba6d61a5106aae900e768320e78d45697bf688fe Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Fri, 16 Jul 2021 14:31:35 -0400 Subject: [PATCH] Resolved Safari Date/Time Issues In Send (#1084) * cleaned up date and time logic for Send * updated jslib * updated jslib --- jslib | 2 +- src/app/oss.module.ts | 5 +- src/app/send/add-edit.component.html | 87 +------------------ src/app/send/efflux-dates.component.html | 103 +++++++++++++++++++++++ src/app/send/efflux-dates.component.ts | 22 +++++ 5 files changed, 134 insertions(+), 85 deletions(-) create mode 100644 src/app/send/efflux-dates.component.html create mode 100644 src/app/send/efflux-dates.component.ts diff --git a/jslib b/jslib index 75fff66f98..58be5796b0 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 75fff66f98e3d174baf369afbb747c1380fad4d4 +Subproject commit 58be5796b0c2b19aacf52d4a1c179aeb80924443 diff --git a/src/app/oss.module.ts b/src/app/oss.module.ts index 570b204284..3f51aa9b59 100644 --- a/src/app/oss.module.ts +++ b/src/app/oss.module.ts @@ -5,7 +5,7 @@ import { } from '@angular/common'; import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; import { ToasterModule } from 'angular2-toaster'; @@ -99,6 +99,7 @@ import { VaultComponent as OrgVaultComponent } from './organizations/vault/vault import { AccessComponent } from './send/access.component'; import { AddEditComponent as SendAddEditComponent } from './send/add-edit.component'; +import { EffluxDatesComponent as SendEffluxDatesComponent } from './send/efflux-dates.component'; import { SendComponent } from './send/send.component'; import { AccountComponent } from './settings/account.component'; @@ -275,6 +276,7 @@ registerLocaleData(localeZhTw, 'zh-TW'); InfiniteScrollModule, DragDropModule, ToasterModule.forChild(), + ReactiveFormsModule, RouterModule, ], declarations: [ @@ -398,6 +400,7 @@ registerLocaleData(localeZhTw, 'zh-TW'); SearchPipe, SelectCopyDirective, SendAddEditComponent, + SendEffluxDatesComponent, SendComponent, SettingsComponent, ShareComponent, diff --git a/src/app/send/add-edit.component.html b/src/app/send/add-edit.component.html index cceefa7a54..d852d4b8d2 100644 --- a/src/app/send/add-edit.component.html +++ b/src/app/send/add-edit.component.html @@ -92,89 +92,10 @@
-
-
- - - - - -
- - - -
-
-
- - - - - -
-
- - -
-
{{'deletionDateDesc' | i18n}}
-
-
-
- - - {{'clear' | i18n}} - -
- - - - -
- - - -
-
-
- - - - - -
-
- - -
-
{{'expirationDateDesc' | i18n}}
-
-
+ +
diff --git a/src/app/send/efflux-dates.component.html b/src/app/send/efflux-dates.component.html new file mode 100644 index 0000000000..e3a4571188 --- /dev/null +++ b/src/app/send/efflux-dates.component.html @@ -0,0 +1,103 @@ +
+
+ + + + +
+ + +
+
+ +
+ + +
+
+ + + +
+
+
+ + + + + +
+
+ + +
+
{{'deletionDateDesc' | i18n}}
+
+
+
+ + + {{'clear' | i18n}} + +
+ + +
+ + +
+ +
+ + +
+ + + +
+
+
+ + + + + +
+
+ + +
+
{{'expirationDateDesc' | i18n}}
+
+
diff --git a/src/app/send/efflux-dates.component.ts b/src/app/send/efflux-dates.component.ts new file mode 100644 index 0000000000..2ac82e652b --- /dev/null +++ b/src/app/send/efflux-dates.component.ts @@ -0,0 +1,22 @@ +import { DatePipe } from '@angular/common'; + +import { Component } from '@angular/core'; + +import { ControlContainer, NgForm } from '@angular/forms'; + +import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; + +import { EffluxDatesComponent as BaseEffluxDatesComponent } from 'jslib-angular/components/send/efflux-dates.component'; + +@Component({ + selector: 'app-send-efflux-dates', + templateUrl: 'efflux-dates.component.html', + viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], +}) +export class EffluxDatesComponent extends BaseEffluxDatesComponent { + constructor(protected i18nService: I18nService, protected platformUtilsService: PlatformUtilsService, + protected datePipe: DatePipe) { + super(i18nService, platformUtilsService, datePipe); + } +}