1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 13:53:34 +00:00

[Send] Updated delete function for add/edit component (#277)

* [Send] Updated delete function for add/edit component

* Saved final return statement
This commit is contained in:
Vincent Salucci
2021-02-19 10:23:51 -06:00
committed by GitHub
parent 5f5580cff9
commit 8a3b551c6e

View File

@@ -219,16 +219,16 @@ export class AddEditComponent implements OnInit {
}
}
async delete(): Promise<void> {
async delete(): Promise<boolean> {
if (this.deletePromise != null) {
return;
return false;
}
const confirmed = await this.platformUtilsService.showDialog(
this.i18nService.t('deleteSendConfirmation'),
this.i18nService.t('deleteSend'),
this.i18nService.t('yes'), this.i18nService.t('no'), 'warning');
if (!confirmed) {
return;
return false;
}
try {
@@ -237,7 +237,10 @@ export class AddEditComponent implements OnInit {
this.platformUtilsService.showToast('success', null, this.i18nService.t('deletedSend'));
await this.load();
this.onDeletedSend.emit(this.send);
return true;
} catch { }
return false;
}
typeChanged() {