mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-15 07:43:27 +00:00
Initial commit for bootstrap styled set-password
This commit is contained in:
@@ -1,105 +1,81 @@
|
|||||||
<form id="set-password-page" #form>
|
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate autocomplete="off">
|
||||||
<div class="content">
|
<div class="row justify-content-md-center mt-5">
|
||||||
<img class="logo-image" alt="Bitwarden">
|
<div class="col-5">
|
||||||
<p class="lead">{{'setMasterPassword' | i18n}}</p>
|
<p class="lead text-center mb-4">{{'setMasterPassword' | i18n}}</p>
|
||||||
<div class="box">
|
<div class="card d-block">
|
||||||
<app-callout type="tip">{{'ssoCompleteRegistration' | i18n}}</app-callout>
|
<div class="card-body">
|
||||||
<app-callout type="info" *ngIf="enforcedPolicyOptions">
|
<app-callout type="info">{{'ssoCompleteRegistration' | i18n}}</app-callout>
|
||||||
{{'masterPasswordPolicyInEffect' | i18n}}
|
<div class="form-group">
|
||||||
<ul>
|
<app-callout type="info" *ngIf="enforcedPolicyOptions">
|
||||||
<li *ngIf="enforcedPolicyOptions?.minComplexity > 0">
|
{{'masterPasswordPolicyInEffect' | i18n}}
|
||||||
{{'policyInEffectMinComplexity' | i18n : getPasswordScoreAlertDisplay()}}
|
<ul class="mb-0">
|
||||||
</li>
|
<li *ngIf="enforcedPolicyOptions?.minComplexity > 0">
|
||||||
<li *ngIf="enforcedPolicyOptions?.minLength > 0">
|
{{'policyInEffectMinComplexity' | i18n : getPasswordScoreAlertDisplay()}}
|
||||||
{{'policyInEffectMinLength' | i18n : enforcedPolicyOptions?.minLength.toString()}}
|
</li>
|
||||||
</li>
|
<li *ngIf="enforcedPolicyOptions?.minLength > 0">
|
||||||
<li *ngIf="enforcedPolicyOptions?.requireUpper">{{'policyInEffectUppercase' | i18n}}</li>
|
{{'policyInEffectMinLength' | i18n : enforcedPolicyOptions?.minLength.toString()}}
|
||||||
<li *ngIf="enforcedPolicyOptions?.requireLower">{{'policyInEffectLowercase' | i18n}}</li>
|
</li>
|
||||||
<li *ngIf="enforcedPolicyOptions?.requireNumbers">{{'policyInEffectNumbers' | i18n}}</li>
|
<li *ngIf="enforcedPolicyOptions?.requireUpper">
|
||||||
<li *ngIf="enforcedPolicyOptions?.requireSpecial">{{'policyInEffectSpecial' | i18n : '!@#$%^&*'}}
|
{{'policyInEffectUppercase' | i18n}}</li>
|
||||||
</li>
|
<li *ngIf="enforcedPolicyOptions?.requireLower">
|
||||||
</ul>
|
{{'policyInEffectLowercase' | i18n}}</li>
|
||||||
</app-callout>
|
<li *ngIf="enforcedPolicyOptions?.requireNumbers">
|
||||||
</div>
|
{{'policyInEffectNumbers' | i18n}}</li>
|
||||||
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate autocomplete="off">
|
<li *ngIf="enforcedPolicyOptions?.requireSpecial">
|
||||||
<div class="box">
|
{{'policyInEffectSpecial' | i18n : '!@#$%^&*'}}</li>
|
||||||
<div class="box-content">
|
</ul>
|
||||||
<div class="box-content-row" appBoxRow>
|
</app-callout>
|
||||||
<div class="box-content-row-flex">
|
<label for="masterPassword">{{'masterPass' | i18n}}</label>
|
||||||
<div class="row-main">
|
<div class="d-flex">
|
||||||
<label for="masterPassword">{{'masterPass' | i18n}}
|
<div class="w-100">
|
||||||
<strong class="sub-label text-{{masterPasswordScoreColor}}"
|
|
||||||
*ngIf="masterPasswordScoreText">
|
|
||||||
{{masterPasswordScoreText}}
|
|
||||||
</strong>
|
|
||||||
</label>
|
|
||||||
<input id="masterPassword" type="{{showPassword ? 'text' : 'password'}}"
|
<input id="masterPassword" type="{{showPassword ? 'text' : 'password'}}"
|
||||||
name="MasterPassword" class="monospaced" [(ngModel)]="masterPassword" required
|
name="MasterPasswordHash" class="text-monospace form-control mb-1"
|
||||||
(input)="updatePasswordStrength()" appInputVerbatim>
|
[(ngModel)]="masterPassword" (input)="updatePasswordStrength()" required
|
||||||
|
appInputVerbatim>
|
||||||
|
<app-password-strength [score]="masterPasswordScore" [showText]="true">
|
||||||
|
</app-password-strength>
|
||||||
</div>
|
</div>
|
||||||
<div class="action-buttons">
|
<div>
|
||||||
<a class="row-btn" href="#" appStopClick appBlurClick role="button"
|
<button type="button" class="ml-1 btn btn-link"
|
||||||
appA11yTitle="{{'toggleVisibility' | i18n}}" (click)="togglePassword(false)">
|
appA11yTitle="{{'toggleVisibility' | i18n}}" (click)="togglePassword(false)">
|
||||||
<i class="fa fa-lg" aria-hidden="true"
|
<i class="fa fa-lg" aria-hidden="true"
|
||||||
[ngClass]="{'fa-eye': !showPassword, 'fa-eye-slash': showPassword}"></i>
|
[ngClass]="{'fa-eye': !showPassword, 'fa-eye-slash': showPassword}"></i>
|
||||||
</a>
|
</button>
|
||||||
|
<div class="progress-bar invisible"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress">
|
<small class="form-text text-muted">{{'masterPassDesc' | i18n}}</small>
|
||||||
<div class="progress-bar bg-{{masterPasswordScoreColor}}" role="progressbar"
|
</div>
|
||||||
aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"
|
<div class="form-group">
|
||||||
[ngStyle]="{width: (masterPasswordScoreWidth + '%')}"
|
<label for="masterPasswordRetype">{{'reTypeMasterPass' | i18n}}</label>
|
||||||
attr.aria-valuenow="{{masterPasswordScoreWidth}}">
|
<div class="d-flex">
|
||||||
</div>
|
<input id="masterPasswordRetype" type="{{showPassword ? 'text' : 'password'}}"
|
||||||
|
name="MasterPasswordRetype" class="text-monospace form-control"
|
||||||
|
[(ngModel)]="masterPasswordRetype" required appInputVerbatim>
|
||||||
|
<button type="button" class="ml-1 btn btn-link" appA11yTitle="{{'toggleVisibility' | i18n}}"
|
||||||
|
(click)="togglePassword(true)">
|
||||||
|
<i class="fa fa-lg" aria-hidden="true"
|
||||||
|
[ngClass]="{'fa-eye': !showPassword, 'fa-eye-slash': showPassword}"></i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="form-group">
|
||||||
<div class="box-footer">
|
|
||||||
{{'masterPassDesc' | i18n}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="box">
|
|
||||||
<div class="box-content">
|
|
||||||
<div class="box-content-row" appBoxRow>
|
|
||||||
<div class="box-content-row-flex">
|
|
||||||
<div class="row-main">
|
|
||||||
<label for="masterPasswordRetype">{{'reTypeMasterPass' | i18n}}</label>
|
|
||||||
<input id="masterPasswordRetype" type="password" name="MasterPasswordRetype"
|
|
||||||
class="monospaced" [(ngModel)]="masterPasswordRetype" required appInputVerbatim
|
|
||||||
autocomplete="new-password">
|
|
||||||
</div>
|
|
||||||
<div class="action-buttons">
|
|
||||||
<a class="row-btn" href="#" appStopClick appBlurClick role="button"
|
|
||||||
appA11yTitle="{{'toggleVisibility' | i18n}}" (click)="togglePassword(true)">
|
|
||||||
<i class="fa fa-lg" aria-hidden="true"
|
|
||||||
[ngClass]="{'fa-eye': !showPassword, 'fa-eye-slash': showPassword}"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="box last">
|
|
||||||
<div class="box-content">
|
|
||||||
<div class="box-content-row" appBoxRow>
|
|
||||||
<label for="hint">{{'masterPassHint' | i18n}}</label>
|
<label for="hint">{{'masterPassHint' | i18n}}</label>
|
||||||
<input id="hint" type="text" name="Hint" [(ngModel)]="hint">
|
<input id="hint" class="form-control" type="text" name="Hint" [(ngModel)]="hint">
|
||||||
|
<small class="form-text text-muted">{{'masterPassHintDesc' | i18n}}</small>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="d-flex">
|
||||||
|
<button type="submit" class="btn btn-primary btn-block btn-submit" [disabled]="form.loading">
|
||||||
|
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true"></i>
|
||||||
|
<span>{{'submit' | i18n}}</span>
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-outline-secondary btn-block ml-2 mt-0" (click)="logOut()">
|
||||||
|
{{'logOut' | i18n}}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-footer">
|
|
||||||
{{'masterPassHintDesc' | i18n}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons">
|
</div>
|
||||||
<button type="submit" class="btn primary block" [disabled]="form.loading">
|
|
||||||
<i *ngIf="form.loading" class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}"
|
|
||||||
aria-hidden="true"></i>
|
|
||||||
<span>{{'submit' | i18n}}</span>
|
|
||||||
</button>
|
|
||||||
<button class="btn block" (click)="logOut()">
|
|
||||||
<span>{{'logOut' | i18n}}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user