mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 10:43:35 +00:00
fixing a few bug, asset updates, tweaks (#532)
* fixing a few bug, asset updates, tweaks * dont save until save button clicked
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<div class="form-check mt-2 form-check-block">
|
||||
<input class="form-check-input" type="radio" name="vaultTimeoutAction" id="vaultTimeoutActionLogOut"
|
||||
value="logOut" [(ngModel)]="vaultTimeoutAction">
|
||||
value="logOut" [(ngModel)]="vaultTimeoutAction" (ngModelChange)="vaultTimeoutActionChanged($event)">
|
||||
<label class="form-check-label" for="vaultTimeoutActionLogOut">
|
||||
{{'logOut' | i18n}}
|
||||
<small>{{'vaultTimeoutActionLogOutDesc' | i18n}}</small>
|
||||
|
||||
@@ -70,15 +70,6 @@ export class OptionsComponent implements OnInit {
|
||||
}
|
||||
|
||||
async submit() {
|
||||
if (this.vaultTimeoutAction === 'logOut') {
|
||||
const confirmed = await this.platformUtilsService.showDialog(
|
||||
this.i18nService.t('vaultTimeoutLogOutConfirmation'),
|
||||
this.i18nService.t('vaultTimeoutLogOutConfirmationTitle'),
|
||||
this.i18nService.t('yes'), this.i18nService.t('cancel'), 'warning');
|
||||
if (!confirmed) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
await this.vaultTimeoutService.setVaultTimeoutOptions(this.vaultTimeout != null ? this.vaultTimeout : null,
|
||||
this.vaultTimeoutAction);
|
||||
await this.storageService.save(ConstantsService.disableFaviconKey, this.disableIcons);
|
||||
@@ -93,4 +84,18 @@ export class OptionsComponent implements OnInit {
|
||||
this.toasterService.popAsync('success', null, this.i18nService.t('optionsUpdated'));
|
||||
}
|
||||
}
|
||||
|
||||
async vaultTimeoutActionChanged(newValue: string) {
|
||||
if (newValue === 'logOut') {
|
||||
const confirmed = await this.platformUtilsService.showDialog(
|
||||
this.i18nService.t('vaultTimeoutLogOutConfirmation'),
|
||||
this.i18nService.t('vaultTimeoutLogOutConfirmationTitle'),
|
||||
this.i18nService.t('yes'), this.i18nService.t('cancel'), 'warning');
|
||||
if (!confirmed) {
|
||||
this.vaultTimeoutAction = 'lock';
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.vaultTimeoutAction = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -500,7 +500,7 @@
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
|
||||
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true"></i>
|
||||
<span>{{(cipher.isDeleted ? 'restore' : 'save') | i18n}}</span>
|
||||
<span>{{(cipher?.isDeleted ? 'restore' : 'save') | i18n}}</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">
|
||||
{{'cancel' | i18n}}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{permanent ? 'permanentlyDeleteSelectedItemsDesc' : 'deleteSelectedItemsDesc' | i18n: cipherIds.length}}
|
||||
{{(permanent ? 'permanentlyDeleteSelectedItemsDesc' : 'deleteSelectedItemsDesc') | i18n: cipherIds.length}}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button appAutoFocus type="submit" class="btn btn-danger btn-submit" [disabled]="form.loading">
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
{{'restoreSelectedItemsDesc' | i18n: cipherIds.length}}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button appAutoFocus type="submit" class="btn btn-submit" [disabled]="form.loading">
|
||||
<button appAutoFocus type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
|
||||
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true"></i>
|
||||
<span>{{'restore' | i18n}}</span>
|
||||
</button>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<td (click)="checkCipher(c)" class="reduced-lh wrap">
|
||||
<a href="#" appStopClick appStopProp (click)="selectCipher(c)"
|
||||
title="{{'editItem' | i18n}}">{{c.name}}</a>
|
||||
<ng-container *ngIf="!organization && c.organizationId && !c.isDeleted">
|
||||
<ng-container *ngIf="!organization && c.organizationId">
|
||||
<i class="fa fa-share-alt" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{'shared' | i18n}}</span>
|
||||
</ng-container>
|
||||
|
||||
Reference in New Issue
Block a user