1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +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:
Kyle Spearrin
2020-05-18 09:51:20 -04:00
committed by GitHub
parent 3ac46e62cb
commit 97eedb2034
14 changed files with 51 additions and 38 deletions

View File

@@ -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;
}
}