mirror of
https://github.com/bitwarden/browser
synced 2026-01-04 01:23:57 +00:00
[KeyConnector] Add support for key connector OTP (#1256)
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<form #form (ngSubmit)="submit()" ngNativeValidate [appApiAction]="formPromise">
|
||||
<form #form (ngSubmit)="submit()" ngNativeValidate [appApiAction]="formPromise" [formGroup]="exportForm">
|
||||
<div class="page-header">
|
||||
<h1>{{'exportVault' | i18n}}</h1>
|
||||
</div>
|
||||
@@ -11,21 +11,18 @@
|
||||
<div class="row">
|
||||
<div class="form-group col-6">
|
||||
<label for="format">{{'fileFormat' | i18n}}</label>
|
||||
<select class="form-control" id="format" name="Format" [(ngModel)]="format" [disabled]="disabledByPolicy">
|
||||
<option value="json">.json</option>
|
||||
<option value="csv">.csv</option>
|
||||
<option value="encrypted_json">.json (Encrypted)</option>
|
||||
<select class="form-control" id="format" name="Format" formControlName="format">
|
||||
<option *ngFor="let f of formatOptions" [value]="f.value">{{f.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-6">
|
||||
<label for="masterPassword">{{'masterPass' | i18n}}</label>
|
||||
<input id="masterPassword" type="password" name="MasterPassword" class="form-control"
|
||||
[(ngModel)]="masterPassword" required appInputVerbatim [disabled]="disabledByPolicy">
|
||||
<app-verify-master-password ngDefaultControl formControlName="secret" name="secret">
|
||||
</app-verify-master-password>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" [disabled]="form.loading || disabledByPolicy">
|
||||
<button type="submit" class="btn btn-primary" [disabled]="form.loading || exportForm.disabled">
|
||||
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true" *ngIf="form.loading"></i>
|
||||
<span *ngIf="!form.loading">{{'exportVault' | i18n}}</span>
|
||||
</button>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
|
||||
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
||||
import { EventService } from 'jslib-common/abstractions/event.service';
|
||||
@@ -7,6 +8,7 @@ import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||
import { LogService } from 'jslib-common/abstractions/log.service';
|
||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||
import { PolicyService } from 'jslib-common/abstractions/policy.service';
|
||||
import { UserVerificationService } from 'jslib-common/abstractions/userVerification.service';
|
||||
|
||||
import { ExportComponent as BaseExportComponent } from 'jslib-angular/components/export.component';
|
||||
|
||||
@@ -19,14 +21,14 @@ export class ExportComponent extends BaseExportComponent {
|
||||
|
||||
constructor(cryptoService: CryptoService, i18nService: I18nService,
|
||||
platformUtilsService: PlatformUtilsService, exportService: ExportService,
|
||||
eventService: EventService, policyService: PolicyService, logService: LogService) {
|
||||
eventService: EventService, policyService: PolicyService, logService: LogService,
|
||||
userVerificationService: UserVerificationService, fb: FormBuilder) {
|
||||
super(cryptoService, i18nService, platformUtilsService, exportService, eventService,
|
||||
policyService, window, logService);
|
||||
policyService, window, logService, userVerificationService, fb);
|
||||
}
|
||||
|
||||
protected saved() {
|
||||
super.saved();
|
||||
this.masterPassword = null;
|
||||
this.platformUtilsService.showToast('success', null, this.i18nService.t('exportSuccess'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user