1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-08-26 23:09:46 +02:00

return confirmed from delete

This commit is contained in:
Kyle Spearrin 2018-04-11 16:27:10 -04:00
parent 44a9d17dba
commit 7bc65b8366

View File

@ -218,12 +218,12 @@ export class AddEditComponent {
this.onEditAttachments.emit(this.cipher);
}
async delete() {
async delete(): Promise<boolean> {
const confirmed = await this.platformUtilsService.showDialog(
this.i18nService.t('deleteItemConfirmation'), this.i18nService.t('deleteItem'),
this.i18nService.t('yes'), this.i18nService.t('no'), 'warning');
if (!confirmed) {
return;
return false;
}
try {
@ -233,6 +233,8 @@ export class AddEditComponent {
this.toasterService.popAsync('success', null, this.i18nService.t('deletedItem'));
this.onDeletedCipher.emit(this.cipher);
} catch { }
return true;
}
async generatePassword(): Promise<boolean> {