From 8840f070321d19181134df26c901365dd7ce29f1 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 25 Jan 2018 14:57:49 -0500 Subject: [PATCH] lint fixes --- src/app/vault/add.component.ts | 14 ++++++++++++++ src/app/vault/view.component.ts | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/app/vault/add.component.ts b/src/app/vault/add.component.ts index 89bc7ad2..5ac1c0a1 100644 --- a/src/app/vault/add.component.ts +++ b/src/app/vault/add.component.ts @@ -6,9 +6,16 @@ import { OnChanges, } from '@angular/core'; +import { CipherType } from 'jslib/enums/cipherType'; +import { SecureNoteType } from 'jslib/enums/secureNoteType'; + import { CipherService } from 'jslib/abstractions/cipher.service'; +import { CardView } from 'jslib/models/view/cardView'; import { CipherView } from 'jslib/models/view/cipherView'; +import { IdentityView } from 'jslib/models/view/identityView'; +import { LoginView } from 'jslib/models/view/loginView'; +import { SecureNoteView } from 'jslib/models/view/secureNoteView'; @Component({ selector: 'app-vault-add', @@ -23,5 +30,12 @@ export class AddComponent implements OnChanges { async ngOnChanges() { this.cipher = new CipherView(); + this.cipher.folderId = null; // TODO + this.cipher.type = CipherType.Login; + this.cipher.login = new LoginView(); + this.cipher.card = new CardView(); + this.cipher.identity = new IdentityView(); + this.cipher.secureNote = new SecureNoteView(); + this.cipher.secureNote.type = SecureNoteType.Generic; } } diff --git a/src/app/vault/view.component.ts b/src/app/vault/view.component.ts index 3a681b2e..096db7a2 100644 --- a/src/app/vault/view.component.ts +++ b/src/app/vault/view.component.ts @@ -57,7 +57,7 @@ export class ViewComponent implements OnChanges, OnDestroy { this.isPremium = this.tokenService.getPremium(); - if (this.cipher.type == CipherType.Login && this.cipher.login.totp && + if (this.cipher.type === CipherType.Login && this.cipher.login.totp && (cipher.organizationUseTotp || this.isPremium)) { await this.totpUpdateCode(); await this.totpTick();