1
0
mirror of https://github.com/bitwarden/web synced 2025-12-06 00:03:28 +00:00

delete from cipher list

This commit is contained in:
Kyle Spearrin
2018-06-12 14:15:19 -04:00
parent 4aacc06af0
commit 1f3ecbab33

View File

@@ -49,8 +49,18 @@ export class CiphersComponent extends BaseCiphersComponent {
this.onCollectionsClicked.emit(c);
}
delete(c: CipherView) {
//
async delete(c: CipherView): 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 false;
}
await this.cipherService.deleteWithServer(c.id);
this.analytics.eventTrack.next({ action: 'Deleted Cipher' });
this.toasterService.popAsync('success', null, this.i18nService.t('deletedItem'));
this.refresh();
}
copy(value: string, typeI18nKey: string, aType: string) {