diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 1895d07f..641333f1 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 00000000..fc519f47 --- /dev/null +++ b/src/app/vault/add-edit-custom-fields.component.html @@ -0,0 +1,52 @@ +
+
+ {{'customFields' | i18n}} +
+
+
+
+ + + + + +
+ + + +
+ +
+ + + +
+
+ +
+
+
+
+ + {{'newCustomField' | i18n}} + + + +
+
+
diff --git a/src/app/vault/add-edit-custom-fields.component.ts b/src/app/vault/add-edit-custom-fields.component.ts new file mode 100644 index 00000000..ff0d9834 --- /dev/null +++ b/src/app/vault/add-edit-custom-fields.component.ts @@ -0,0 +1,18 @@ +import { Component } from '@angular/core'; + +import { + AddEditCustomFieldsComponent as BaseAddEditCustomFieldsComponent +} from 'jslib-angular/components/add-edit-custom-fields.component'; + +import { EventService } from 'jslib-common/abstractions/event.service'; +import { I18nService } from 'jslib-common/abstractions/i18n.service'; + +@Component({ + selector: 'app-vault-add-edit-custom-fields', + templateUrl: 'add-edit-custom-fields.component.html', +}) +export class AddEditCustomFieldsComponent extends BaseAddEditCustomFieldsComponent { + constructor(i18nService: I18nService, eventService: EventService) { + super(i18nService, eventService); + } +} diff --git a/src/app/vault/add-edit.component.html b/src/app/vault/add-edit.component.html index cd026986..d7f4ecec 100644 --- a/src/app/vault/add-edit.component.html +++ b/src/app/vault/add-edit.component.html @@ -281,58 +281,7 @@ -
-
- {{'customFields' | i18n}} -
-
-
-
- - - - - -
- - - -
- -
- - - -
-
- -
-
-
-
- - {{'newCustomField' | i18n}} - - - -
-
-
+
{{'ownership' | i18n}} diff --git a/src/app/vault/view-custom-fields.component.html b/src/app/vault/view-custom-fields.component.html new file mode 100644 index 00000000..06494343 --- /dev/null +++ b/src/app/vault/view-custom-fields.component.html @@ -0,0 +1,38 @@ +
+
+ {{'customFields' | i18n}} +
+
+
+
+ {{field.name}} +
+ {{field.value || ' '}} +
+
+ {{field.value}} + {{field.maskedValue}} +
+
+ + + {{field.value}} +
+
+ +
+
+
diff --git a/src/app/vault/view-custom-fields.component.ts b/src/app/vault/view-custom-fields.component.ts new file mode 100644 index 00000000..916a1df2 --- /dev/null +++ b/src/app/vault/view-custom-fields.component.ts @@ -0,0 +1,19 @@ +import { + Component, +} from '@angular/core'; + +import { EventService } from 'jslib-common/abstractions/event.service'; + +import { + ViewCustomFieldsComponent as BaseViewCustomFieldsComponent +} from 'jslib-angular/components/view-custom-fields.component'; + +@Component({ + selector: 'app-vault-view-custom-fields', + templateUrl: 'view-custom-fields.component.html', +}) +export class ViewCustomFieldsComponent extends BaseViewCustomFieldsComponent { + constructor(eventService: EventService) { + super(eventService); + } +} diff --git a/src/app/vault/view.component.html b/src/app/vault/view.component.html index 4a94f68f..e659f800 100644 --- a/src/app/vault/view.component.html +++ b/src/app/vault/view.component.html @@ -204,44 +204,9 @@
{{cipher.notes}}
-
-
- {{'customFields' | i18n}} -
-
-
-
- {{field.name}} -
- {{field.value || ' '}} -
-
- {{field.value}} - {{field.maskedValue}} -
-
- - - {{field.value}} -
-
- -
-
-
+ +
{{'attachments' | i18n}}