From c385efdbd2f38149132ab1251c4f02bb088ac200 Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Tue, 21 Sep 2021 10:48:17 +1000 Subject: [PATCH] Move custom fields to separate components (#1076) * Move custom fields to own component * Update jslib * Fix import statements * Fix linting --- src/app/app.module.ts | 4 ++ .../add-edit-custom-fields.component.html | 52 ++++++++++++++++++ .../vault/add-edit-custom-fields.component.ts | 18 +++++++ src/app/vault/add-edit.component.html | 53 +------------------ .../vault/view-custom-fields.component.html | 38 +++++++++++++ src/app/vault/view-custom-fields.component.ts | 19 +++++++ src/app/vault/view.component.html | 41 ++------------ 7 files changed, 135 insertions(+), 90 deletions(-) create mode 100644 src/app/vault/add-edit-custom-fields.component.html create mode 100644 src/app/vault/add-edit-custom-fields.component.ts create mode 100644 src/app/vault/view-custom-fields.component.html create mode 100644 src/app/vault/view-custom-fields.component.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 1895d07f64..641333f183 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -49,6 +49,7 @@ import { ColorPasswordPipe } from 'jslib-angular/pipes/color-password.pipe'; import { I18nPipe } from 'jslib-angular/pipes/i18n.pipe'; import { SearchCiphersPipe } from 'jslib-angular/pipes/search-ciphers.pipe'; +import { AddEditCustomFieldsComponent } from './vault/add-edit-custom-fields.component'; import { AddEditComponent } from './vault/add-edit.component'; import { AttachmentsComponent } from './vault/attachments.component'; import { CiphersComponent } from './vault/ciphers.component'; @@ -61,6 +62,7 @@ import { PasswordGeneratorComponent } from './vault/password-generator.component import { PasswordHistoryComponent } from './vault/password-history.component'; import { ShareComponent } from './vault/share.component'; import { VaultComponent } from './vault/vault.component'; +import { ViewCustomFieldsComponent } from './vault/view-custom-fields.component'; import { ViewComponent } from './vault/view.component'; import { AddEditComponent as SendAddEditComponent } from './send/add-edit.component'; @@ -226,6 +228,8 @@ registerLocaleData(localeZhTw, 'zh-TW'); PasswordRepromptComponent, SetPinComponent, VaultTimeoutInputComponent, + AddEditCustomFieldsComponent, + ViewCustomFieldsComponent, ], providers: [DatePipe], bootstrap: [AppComponent], diff --git a/src/app/vault/add-edit-custom-fields.component.html b/src/app/vault/add-edit-custom-fields.component.html new file mode 100644 index 0000000000..fc519f4794 --- /dev/null +++ b/src/app/vault/add-edit-custom-fields.component.html @@ -0,0 +1,52 @@ +