1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-12-31 17:47:43 +01:00

Resolve preferences not setting correct focus (#1336)

This commit is contained in:
Oscar Hinton 2022-02-14 14:23:05 +01:00 committed by GitHub
parent 6b6468e061
commit 2470d8ce25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,184 +2,184 @@
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-body form"> <div class="modal-body form">
<ng-container *ngIf="currentUserEmail != null"> <div class="box">
<div class="box"> <label class="settingsTitle">{{ "settingsTitle" | i18n: currentUserEmail }} </label>
<label class="settingsTitle">{{ "settingsTitle" | i18n: currentUserEmail }} </label> <div class="box-content box-content-padded">
<div class="box-content box-content-padded"> <h2>
<h2> <button
<button id="app-settings"
type="button" type="button"
class="box-header-expandable" class="box-header-expandable"
(click)="showSecurity = !showSecurity" (click)="showSecurity = !showSecurity"
[attr.aria-expanded]="showSecurity" [attr.aria-expanded]="showSecurity"
> appAutofocus
{{ "security" | i18n }} >
<i {{ "security" | i18n }}
*ngIf="!showSecurity" <i
class="bwi bwi-angle-down bwi-sm icon" *ngIf="!showSecurity"
aria-hidden="true" class="bwi bwi-angle-down bwi-sm icon"
></i> aria-hidden="true"
<i ></i>
*ngIf="showSecurity" <i
class="bwi bwi-chevron-up bwi-sm icon" *ngIf="showSecurity"
aria-hidden="true" class="bwi bwi-chevron-up bwi-sm icon"
></i> aria-hidden="true"
</button> ></i>
</h2> </button>
<ng-container *ngIf="showSecurity"> </h2>
<app-vault-timeout-input <ng-container *ngIf="showSecurity">
[vaultTimeouts]="vaultTimeouts" <app-vault-timeout-input
[formControl]="vaultTimeout" [vaultTimeouts]="vaultTimeouts"
ngDefaultControl [formControl]="vaultTimeout"
></app-vault-timeout-input> ngDefaultControl
<div class="form-group"> ></app-vault-timeout-input>
<label>{{ "vaultTimeoutAction" | i18n }}</label> <div class="form-group">
<div class="radio radio-mt-2"> <label>{{ "vaultTimeoutAction" | i18n }}</label>
<label for="vaultTimeoutActionLock"> <div class="radio radio-mt-2">
<input <label for="vaultTimeoutActionLock">
type="radio" <input
name="VaultTimeoutAction" type="radio"
id="vaultTimeoutActionLock" name="VaultTimeoutAction"
value="lock" id="vaultTimeoutActionLock"
[(ngModel)]="vaultTimeoutAction" value="lock"
(change)="saveVaultTimeoutOptions()" [(ngModel)]="vaultTimeoutAction"
/> (change)="saveVaultTimeoutOptions()"
{{ "lock" | i18n }} />
</label> {{ "lock" | i18n }}
</div> </label>
<small class="help-block">{{ "vaultTimeoutActionLockDesc" | i18n }}</small>
<div class="radio">
<label for="vaultTimeoutActionLogOut">
<input
type="radio"
name="VaultTimeoutAction"
id="vaultTimeoutActionLogOut"
value="logOut"
[(ngModel)]="vaultTimeoutAction"
(change)="saveVaultTimeoutOptions()"
/>
{{ "logOut" | i18n }}
</label>
</div>
<small class="help-block">{{ "vaultTimeoutActionLogOutDesc" | i18n }}</small>
</div> </div>
<div class="form-group"> <small class="help-block">{{ "vaultTimeoutActionLockDesc" | i18n }}</small>
<div class="checkbox"> <div class="radio">
<label for="pin"> <label for="vaultTimeoutActionLogOut">
<input <input
id="pin" type="radio"
type="checkbox" name="VaultTimeoutAction"
name="PIN" id="vaultTimeoutActionLogOut"
[(ngModel)]="pin" value="logOut"
(change)="updatePin()" [(ngModel)]="vaultTimeoutAction"
/> (change)="saveVaultTimeoutOptions()"
{{ "unlockWithPin" | i18n }} />
</label> {{ "logOut" | i18n }}
</div> </label>
</div> </div>
<div class="form-group" *ngIf="supportsBiometric"> <small class="help-block">{{ "vaultTimeoutActionLogOutDesc" | i18n }}</small>
<div class="checkbox"> </div>
<label for="biometric"> <div class="form-group">
<input <div class="checkbox">
id="biometric" <label for="pin">
type="checkbox" <input
name="biometric" id="pin"
[checked]="biometric" type="checkbox"
(change)="updateBiometric()" name="PIN"
/> [(ngModel)]="pin"
{{ biometricText | i18n }} (change)="updatePin()"
</label> />
</div> {{ "unlockWithPin" | i18n }}
</label>
</div> </div>
<div class="form-group" *ngIf="supportsBiometric"> </div>
<div class="checkbox"> <div class="form-group" *ngIf="supportsBiometric">
<label for="noAutoPromptBiometrics"> <div class="checkbox">
<input <label for="biometric">
id="noAutoPromptBiometrics" <input
type="checkbox" id="biometric"
name="noAutoPromptBiometrics" type="checkbox"
[(ngModel)]="noAutoPromptBiometrics" name="biometric"
[disabled]="!biometric" [checked]="biometric"
(change)="updateNoAutoPromptBiometrics()" (change)="updateBiometric()"
/> />
{{ noAutoPromptBiometricsText | i18n }} {{ biometricText | i18n }}
</label> </label>
</div>
</div> </div>
</ng-container> </div>
</div> <div class="form-group" *ngIf="supportsBiometric">
<div class="checkbox">
<label for="noAutoPromptBiometrics">
<input
id="noAutoPromptBiometrics"
type="checkbox"
name="noAutoPromptBiometrics"
[(ngModel)]="noAutoPromptBiometrics"
[disabled]="!biometric"
(change)="updateNoAutoPromptBiometrics()"
/>
{{ noAutoPromptBiometricsText | i18n }}
</label>
</div>
</div>
</ng-container>
</div> </div>
<div class="box"> </div>
<div class="box-content box-content-padded"> <div class="box">
<h2> <div class="box-content box-content-padded">
<button <h2>
type="button" <button
class="box-header-expandable" type="button"
(click)="showAccountPreferences = !showAccountPreferences" class="box-header-expandable"
[attr.aria-expanded]="showAccountPreferences" (click)="showAccountPreferences = !showAccountPreferences"
[attr.aria-expanded]="showAccountPreferences"
>
{{ "accountPreferences" | i18n }}
<i
*ngIf="!showAccountPreferences"
class="bwi bwi-angle-down bwi-sm icon"
aria-hidden="true"
></i>
<i
*ngIf="showAccountPreferences"
class="bwi bwi-chevron-up bwi-sm icon"
aria-hidden="true"
></i>
</button>
</h2>
<ng-container *ngIf="showAccountPreferences">
<div class="form-group">
<label for="clearClipboard">{{ "clearClipboard" | i18n }}</label>
<select
id="clearClipboard"
name="ClearClipboard"
[(ngModel)]="clearClipboard"
(change)="saveClearClipboard()"
> >
{{ "accountPreferences" | i18n }} <option *ngFor="let o of clearClipboardOptions" [ngValue]="o.value">
<i {{ o.name }}
*ngIf="!showAccountPreferences" </option>
class="bwi bwi-angle-down bwi-sm icon" </select>
aria-hidden="true" <small class="help-block">{{ "clearClipboardDesc" | i18n }}</small>
></i> </div>
<i <div class="form-group">
*ngIf="showAccountPreferences" <div class="checkbox">
class="bwi bwi-chevron-up bwi-sm icon" <label for="minimizeOnCopyToClipboard">
aria-hidden="true" <input
></i> id="minimizeOnCopyToClipboard"
</button> type="checkbox"
</h2> name="MinimizeOnCopyToClipboard"
<ng-container *ngIf="showAccountPreferences"> [(ngModel)]="minimizeOnCopyToClipboard"
<div class="form-group"> (change)="saveMinOnCopyToClipboard()"
<label for="clearClipboard">{{ "clearClipboard" | i18n }}</label> />
<select {{ "minimizeOnCopyToClipboard" | i18n }}
id="clearClipboard" </label>
name="ClearClipboard"
[(ngModel)]="clearClipboard"
(change)="saveClearClipboard()"
>
<option *ngFor="let o of clearClipboardOptions" [ngValue]="o.value">
{{ o.name }}
</option>
</select>
<small class="help-block">{{ "clearClipboardDesc" | i18n }}</small>
</div> </div>
<div class="form-group"> <small class="help-block">{{ "minimizeOnCopyToClipboardDesc" | i18n }}</small>
<div class="checkbox"> </div>
<label for="minimizeOnCopyToClipboard"> <div class="form-group">
<input <div class="checkbox">
id="minimizeOnCopyToClipboard" <label for="disableFavicons">
type="checkbox" <input
name="MinimizeOnCopyToClipboard" id="disableFavicons"
[(ngModel)]="minimizeOnCopyToClipboard" type="checkbox"
(change)="saveMinOnCopyToClipboard()" name="DisableFavicons"
/> [(ngModel)]="disableFavicons"
{{ "minimizeOnCopyToClipboard" | i18n }} (change)="saveFavicons()"
</label> />
</div> {{ "disableFavicon" | i18n }}
<small class="help-block">{{ "minimizeOnCopyToClipboardDesc" | i18n }}</small> </label>
</div> </div>
<div class="form-group"> <small class="help-block">{{ "disableFaviconDesc" | i18n }}</small>
<div class="checkbox"> </div>
<label for="disableFavicons"> </ng-container>
<input
id="disableFavicons"
type="checkbox"
name="DisableFavicons"
[(ngModel)]="disableFavicons"
(change)="saveFavicons()"
/>
{{ "disableFavicon" | i18n }}
</label>
</div>
<small class="help-block">{{ "disableFaviconDesc" | i18n }}</small>
</div>
</ng-container>
</div>
</div> </div>
</ng-container> </div>
<div class="box"> <div class="box">
<div class="box-content box-content-padded"> <div class="box-content box-content-padded">
<h2> <h2>