From 7b05416d556c6041e638ec5fcb58a060062cda84 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 9 Jun 2018 13:29:07 -0400 Subject: [PATCH] attachment events --- src/angular/components/attachments.component.ts | 4 ++++ src/angular/dummy.module.ts | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/angular/components/attachments.component.ts b/src/angular/components/attachments.component.ts index 0d13a91305c..fff40c4b0b0 100644 --- a/src/angular/components/attachments.component.ts +++ b/src/angular/components/attachments.component.ts @@ -21,6 +21,8 @@ import { CipherView } from '../../models/view/cipherView'; export class AttachmentsComponent implements OnInit { @Input() cipherId: string; + @Output() onUploadedAttachment = new EventEmitter(); + @Output() onDeletedAttachment = new EventEmitter(); cipher: CipherView; cipherDomain: Cipher; @@ -87,6 +89,7 @@ export class AttachmentsComponent implements OnInit { this.cipher = await this.cipherDomain.decrypt(); this.analytics.eventTrack.next({ action: 'Added Attachment' }); this.toasterService.popAsync('success', null, this.i18nService.t('attachmentSaved')); + this.onUploadedAttachment.emit(); } catch { } // reset file input @@ -121,6 +124,7 @@ export class AttachmentsComponent implements OnInit { } catch { } this.deletePromises[attachment.id] = null; + this.onDeletedAttachment.emit(); } async download(attachment: AttachmentView) { diff --git a/src/angular/dummy.module.ts b/src/angular/dummy.module.ts index 35a1e38142e..1be7f1fed9b 100644 --- a/src/angular/dummy.module.ts +++ b/src/angular/dummy.module.ts @@ -7,7 +7,6 @@ import { TrueFalseValueDirective } from './directives/true-false-value.directive imports: [], declarations: [ InputVerbatimDirective, - TrueFalseValueDirective, ], }) export class DummyModule {