lint fixes
This commit is contained in:
parent
6508895dcc
commit
8840f07032
|
@ -6,9 +6,16 @@ import {
|
||||||
OnChanges,
|
OnChanges,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
|
import { CipherType } from 'jslib/enums/cipherType';
|
||||||
|
import { SecureNoteType } from 'jslib/enums/secureNoteType';
|
||||||
|
|
||||||
import { CipherService } from 'jslib/abstractions/cipher.service';
|
import { CipherService } from 'jslib/abstractions/cipher.service';
|
||||||
|
|
||||||
|
import { CardView } from 'jslib/models/view/cardView';
|
||||||
import { CipherView } from 'jslib/models/view/cipherView';
|
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({
|
@Component({
|
||||||
selector: 'app-vault-add',
|
selector: 'app-vault-add',
|
||||||
|
@ -23,5 +30,12 @@ export class AddComponent implements OnChanges {
|
||||||
|
|
||||||
async ngOnChanges() {
|
async ngOnChanges() {
|
||||||
this.cipher = new CipherView();
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ export class ViewComponent implements OnChanges, OnDestroy {
|
||||||
|
|
||||||
this.isPremium = this.tokenService.getPremium();
|
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)) {
|
(cipher.organizationUseTotp || this.isPremium)) {
|
||||||
await this.totpUpdateCode();
|
await this.totpUpdateCode();
|
||||||
await this.totpTick();
|
await this.totpTick();
|
||||||
|
|
Loading…
Reference in New Issue