1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

lint fixes

This commit is contained in:
Kyle Spearrin 2018-01-25 14:57:49 -05:00
parent 6508895dcc
commit 8840f07032
2 changed files with 15 additions and 1 deletions

View File

@ -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;
}
}

View File

@ -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();