bitwarden-estensione-browser/src/popup/accounts/two-factor.component.html

108 lines
5.5 KiB
HTML
Raw Normal View History

<form id="two-factor-page" #form (ngSubmit)="submit()" [appApiAction]="formPromise">
<header>
<div class="left">
2018-04-04 22:29:43 +02:00
<a routerLink="/login">{{'back' | i18n}}</a>
</div>
<div class="center">
<span class="title">{{title}}</span>
</div>
<div class="right">
2019-02-21 22:53:57 +01:00
<button type="submit" appBlurClick [disabled]="form.loading" *ngIf="selectedProviderType != null && selectedProviderType !== providerType.Duo &&
2018-07-31 03:46:03 +02:00
selectedProviderType !== providerType.OrganizationDuo &&
(selectedProviderType !== providerType.U2f || form.loading)">
<span [hidden]="form.loading">{{'continue' | i18n}}</span>
2019-10-08 23:04:44 +02:00
<i class="fa fa-spinner fa-lg fa-spin" [hidden]="!form.loading" aria-hidden="true"></i>
</button>
</div>
</header>
2018-04-05 16:29:11 +02:00
<content>
<ng-container *ngIf="selectedProviderType === providerType.Authenticator ||
selectedProviderType === providerType.Email">
2018-04-05 16:29:11 +02:00
<div class="content text-center">
<span *ngIf="selectedProviderType === providerType.Authenticator">
{{'enterVerificationCodeApp' | i18n}}
</span>
<span *ngIf="selectedProviderType === providerType.Email">
{{'enterVerificationCodeEmail' | i18n : twoFactorEmail}}
</span>
</div>
2018-04-05 16:29:11 +02:00
<div class="box first">
<div class="box-content">
<div class="box-content-row" appBoxRow>
<label for="code">{{'verificationCode' | i18n}}</label>
2018-04-25 23:53:51 +02:00
<input id="code" type="text" name="Code" [(ngModel)]="token" required appAutofocus
2019-02-21 22:53:57 +01:00
inputmode="tel" appInputVerbatim>
2018-04-05 16:29:11 +02:00
</div>
<div class="box-content-row box-content-row-checkbox" appBoxRow>
<label for="remember">{{'rememberMe' | i18n}}</label>
<input id="remember" type="checkbox" name="Remember" [(ngModel)]="remember">
</div>
</div>
2018-04-05 16:29:11 +02:00
</div>
</ng-container>
<ng-container *ngIf="selectedProviderType === providerType.Yubikey">
<div class="content text-center">
2018-07-24 23:13:39 +02:00
<p class="text-center">{{'insertYubiKey' | i18n}}</p>
2018-04-05 16:29:11 +02:00
<img src="../images/yubikey.jpg" class="img-rounded img-responsive" alt="">
</div>
<div class="box first">
<div class="box-content">
<div class="box-content-row" appBoxRow>
<label for="code" class="sr-only">{{'verificationCode' | i18n}}</label>
2018-04-25 23:53:51 +02:00
<input id="code" type="password" name="Code" [(ngModel)]="token" required appAutofocus
2019-02-21 22:53:57 +01:00
appInputVerbatim>
2018-04-05 16:29:11 +02:00
</div>
<div class="box-content-row box-content-row-checkbox" appBoxRow>
<label for="remember">{{'rememberMe' | i18n}}</label>
<input id="remember" type="checkbox" name="Remember" [(ngModel)]="remember">
</div>
</div>
</div>
2018-04-05 16:29:11 +02:00
</ng-container>
<ng-container *ngIf="selectedProviderType === providerType.U2f">
<div class="content text-center">
2018-07-24 23:13:39 +02:00
<span *ngIf="!u2fReady" class="text-center"><i class="fa fa-spinner fa-spin"></i></span>
2018-04-05 16:29:11 +02:00
<div *ngIf="u2fReady">
<p>{{'insertU2f' | i18n}}</p>
<img src="../images/u2fkey.jpg" alt="" class="img-rounded img-responsive" />
</div>
2018-04-04 22:29:43 +02:00
</div>
2018-04-05 16:29:11 +02:00
<div class="box first">
<div class="box-content">
<div class="box-content-row box-content-row-checkbox" appBoxRow>
<label for="remember">{{'rememberMe' | i18n}}</label>
<input id="remember" type="checkbox" name="Remember" [(ngModel)]="remember">
</div>
2018-04-04 22:29:43 +02:00
</div>
</div>
2018-04-05 16:29:11 +02:00
</ng-container>
<ng-container *ngIf="selectedProviderType === providerType.Duo ||
selectedProviderType === providerType.OrganizationDuo">
2019-08-21 16:05:17 +02:00
<div id="duo-frame"><iframe id="duo_iframe"></iframe></div>
2018-04-05 16:29:11 +02:00
<div class="box">
<div class="box-content">
<div class="box-content-row box-content-row-checkbox" appBoxRow>
<label for="remember">{{'rememberMe' | i18n}}</label>
<input id="remember" type="checkbox" name="Remember" [(ngModel)]="remember">
</div>
</div>
</div>
2018-04-05 16:29:11 +02:00
</ng-container>
2018-07-24 23:13:39 +02:00
<div class="content" *ngIf="selectedProviderType == null">
<p class="text-center">{{'noTwoStepProviders' | i18n}}</p>
<p class="text-center">{{'noTwoStepProviders2' | i18n}}</p>
2018-04-05 16:29:11 +02:00
</div>
2018-07-24 23:13:39 +02:00
<div class="content no-vpad" *ngIf="selectedProviderType != null">
<p class="text-center">
2018-04-05 16:29:11 +02:00
<a href="#" appStopClick (click)="anotherMethod()">{{'useAnotherTwoStepMethod' | i18n}}</a>
</p>
2018-07-24 23:13:39 +02:00
<p *ngIf="selectedProviderType === providerType.Email" class="text-center">
2018-04-05 16:29:11 +02:00
<a href="#" appStopClick (click)="sendEmail(true)" [appApiAction]="emailPromise">
{{'sendVerificationCodeEmailAgain' | i18n}}
</a>
</p>
</div>
2018-04-05 16:29:11 +02:00
</content>
</form>
2018-04-04 22:29:43 +02:00
<iframe id="u2f_iframe" hidden></iframe>