mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 02:33:46 +00:00
@@ -1,3 +1,5 @@
|
||||
import * as zxcvbn from 'zxcvbn';
|
||||
|
||||
import { GeneratedPasswordHistory } from '../models/domain/generatedPasswordHistory';
|
||||
import { PasswordGeneratorPolicyOptions } from '../models/domain/passwordGeneratorPolicyOptions';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OnInit } from '@angular/core';
|
||||
import { Directive, OnInit } from '@angular/core';
|
||||
|
||||
import { CryptoService } from '../../abstractions/crypto.service';
|
||||
import { I18nService } from '../../abstractions/i18n.service';
|
||||
@@ -14,6 +14,7 @@ import { SymmetricCryptoKey } from '../../models/domain/symmetricCryptoKey';
|
||||
|
||||
import { KdfType } from '../../enums/kdfType';
|
||||
|
||||
@Directive()
|
||||
export class ChangePasswordComponent implements OnInit {
|
||||
masterPassword: string;
|
||||
masterPasswordRetype: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OnInit } from '@angular/core';
|
||||
import { Directive, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
import { ApiService } from '../../abstractions/api.service';
|
||||
@@ -21,6 +21,7 @@ import { PasswordVerificationRequest } from '../../models/request/passwordVerifi
|
||||
|
||||
import { Utils } from '../../misc/utils';
|
||||
|
||||
@Directive()
|
||||
export class LockComponent implements OnInit {
|
||||
masterPassword: string = '';
|
||||
pin: string = '';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OnInit } from '@angular/core';
|
||||
import { Directive, OnInit } from '@angular/core';
|
||||
|
||||
import { I18nService } from '../../abstractions/i18n.service';
|
||||
import { PasswordGenerationService } from '../../abstractions/passwordGeneration.service';
|
||||
@@ -6,6 +6,7 @@ import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
|
||||
|
||||
import { GeneratedPasswordHistory } from '../../models/domain/generatedPasswordHistory';
|
||||
|
||||
@Directive()
|
||||
export class PasswordGeneratorHistoryComponent implements OnInit {
|
||||
history: GeneratedPasswordHistory[] = [];
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OnInit } from '@angular/core';
|
||||
import { Directive, OnInit } from '@angular/core';
|
||||
|
||||
import { CipherService } from '../../abstractions/cipher.service';
|
||||
import { I18nService } from '../../abstractions/i18n.service';
|
||||
@@ -6,6 +6,7 @@ import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
|
||||
|
||||
import { PasswordHistoryView } from '../../models/view/passwordHistoryView';
|
||||
|
||||
@Directive()
|
||||
export class PasswordHistoryComponent implements OnInit {
|
||||
cipherId: string;
|
||||
history: PasswordHistoryView[] = [];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OnInit } from '@angular/core';
|
||||
import { Directive, OnInit } from '@angular/core';
|
||||
|
||||
import { ApiService } from '../../abstractions/api.service';
|
||||
import { I18nService } from '../../abstractions/i18n.service';
|
||||
@@ -6,6 +6,7 @@ import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
|
||||
import { TokenService } from '../../abstractions/token.service';
|
||||
import { UserService } from '../../abstractions/user.service';
|
||||
|
||||
@Directive()
|
||||
export class PremiumComponent implements OnInit {
|
||||
isPremium: boolean = false;
|
||||
price: number = 10;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { DatePipe } from '@angular/common';
|
||||
|
||||
import {
|
||||
Directive,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnInit,
|
||||
Output,
|
||||
Output
|
||||
} from '@angular/core';
|
||||
|
||||
import { OrganizationUserStatusType } from '../../../enums/organizationUserStatusType';
|
||||
@@ -38,6 +38,7 @@ enum DateField {
|
||||
ExpriationDate = 'expiration',
|
||||
}
|
||||
|
||||
@Directive()
|
||||
export class AddEditComponent implements OnInit {
|
||||
@Input() sendId: string;
|
||||
@Input() type: SendType;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
Directive,
|
||||
NgZone,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
@@ -17,6 +18,7 @@ import { SearchService } from '../../../abstractions/search.service';
|
||||
import { SendService } from '../../../abstractions/send.service';
|
||||
import { UserService } from '../../../abstractions/user.service';
|
||||
|
||||
@Directive()
|
||||
export class SendComponent implements OnInit {
|
||||
|
||||
disableSend = false;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Directive } from '@angular/core';
|
||||
import {
|
||||
ActivatedRoute,
|
||||
Router
|
||||
@@ -23,6 +24,7 @@ import { ChangePasswordComponent as BaseChangePasswordComponent } from './change
|
||||
|
||||
import { KdfType } from '../../enums/kdfType';
|
||||
|
||||
@Directive()
|
||||
export class SetPasswordComponent extends BaseChangePasswordComponent {
|
||||
syncLoading: boolean = true;
|
||||
showPassword: boolean = false;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Directive } from '@angular/core';
|
||||
import {
|
||||
ActivatedRoute,
|
||||
Router,
|
||||
@@ -18,6 +19,7 @@ import { Utils } from '../../misc/utils';
|
||||
|
||||
import { AuthResult } from '../../models/domain/authResult';
|
||||
|
||||
@Directive()
|
||||
export class SsoComponent {
|
||||
identifier: string;
|
||||
loggingIn = false;
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
import { Directive, OnDestroy, OnInit } from '@angular/core';
|
||||
|
||||
import {
|
||||
ActivatedRoute,
|
||||
@@ -28,6 +25,7 @@ import { ConstantsService } from '../../services/constants.service';
|
||||
import * as DuoWebSDK from 'duo_web_sdk';
|
||||
import { WebAuthn } from '../../misc/webauthn';
|
||||
|
||||
@Directive()
|
||||
export class TwoFactorComponent implements OnInit, OnDestroy {
|
||||
token: string = '';
|
||||
remember: boolean = false;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as chk from 'chalk';
|
||||
import * as chalk from 'chalk';
|
||||
|
||||
import { Response } from './models/response';
|
||||
import { ListResponse } from './models/response/listResponse';
|
||||
@@ -7,8 +7,6 @@ import { StringResponse } from './models/response/stringResponse';
|
||||
|
||||
import { UserService } from '../abstractions/user.service';
|
||||
|
||||
const chalk = chk.default;
|
||||
|
||||
export abstract class BaseProgram {
|
||||
constructor(
|
||||
private userService: UserService,
|
||||
|
||||
@@ -27,7 +27,7 @@ export class WindowMain {
|
||||
private createWindowCallback: (win: BrowserWindow) => void) { }
|
||||
|
||||
init(): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
try {
|
||||
if (!isMacAppStore() && !isSnapStore()) {
|
||||
const gotTheLock = app.requestSingleInstanceLock();
|
||||
|
||||
@@ -291,7 +291,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
|
||||
// Have to specify some algorithm
|
||||
hash: { name: this.toWebCryptoAlgorithm('sha1') },
|
||||
};
|
||||
const keyPair = await this.subtle.generateKey(rsaParams, true, ['encrypt', 'decrypt']);
|
||||
const keyPair = (await this.subtle.generateKey(rsaParams, true, ['encrypt', 'decrypt'])) as CryptoKeyPair;
|
||||
const publicKey = await this.subtle.exportKey('spki', keyPair.publicKey);
|
||||
const privateKey = await this.subtle.exportKey('pkcs8', keyPair.privateKey);
|
||||
return [publicKey, privateKey];
|
||||
|
||||
Reference in New Issue
Block a user