mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
delete from cipher list
This commit is contained in:
@@ -49,8 +49,18 @@ export class CiphersComponent extends BaseCiphersComponent {
|
|||||||
this.onCollectionsClicked.emit(c);
|
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) {
|
copy(value: string, typeI18nKey: string, aType: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user