return boolean from generate password
This commit is contained in:
parent
f8d8ca2253
commit
fa5f6c0906
|
@ -235,17 +235,18 @@ export class AddEditComponent {
|
||||||
} catch { }
|
} catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
async generatePassword() {
|
async generatePassword(): Promise<boolean> {
|
||||||
if (this.cipher.login != null && this.cipher.login.password != null && this.cipher.login.password.length) {
|
if (this.cipher.login != null && this.cipher.login.password != null && this.cipher.login.password.length) {
|
||||||
const confirmed = await this.platformUtilsService.showDialog(
|
const confirmed = await this.platformUtilsService.showDialog(
|
||||||
this.i18nService.t('overwritePasswordConfirmation'), this.i18nService.t('overwritePassword'),
|
this.i18nService.t('overwritePasswordConfirmation'), this.i18nService.t('overwritePassword'),
|
||||||
this.i18nService.t('yes'), this.i18nService.t('no'));
|
this.i18nService.t('yes'), this.i18nService.t('no'));
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.onGeneratePassword.emit();
|
this.onGeneratePassword.emit();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
togglePassword() {
|
togglePassword() {
|
||||||
|
|
Loading…
Reference in New Issue