diff src/app/notebook-feed/notebook-feed.component.ts @ 456:7bb0bac6f8dc

Add export button for recordings and option to remove audio item (also removes all related analyses atm). Revokes associated object url for audio on removal. Will be problematic if the history is used for undo / redo.
author Lucas Thompson <dev@lucas.im>
date Thu, 29 Jun 2017 20:11:14 +0100
parents 524f5cd75737
children ccce2c09502e
line wrap: on
line diff
--- a/src/app/notebook-feed/notebook-feed.component.ts	Thu Jun 29 20:09:11 2017 +0100
+++ b/src/app/notebook-feed/notebook-feed.component.ts	Thu Jun 29 20:11:14 2017 +0100
@@ -4,10 +4,10 @@
 import {
   ChangeDetectionStrategy,
   ChangeDetectorRef,
-  Component,
+  Component, EventEmitter,
   Inject,
   Input,
-  OnDestroy
+  OnDestroy, Output
 } from '@angular/core';
 import Waves from 'waves-ui-piper';
 import {
@@ -32,6 +32,7 @@
     this._rootAudioUri = uri;
   }
   @Input() onSeek: OnSeekHandler;
+  @Output() removeItem: EventEmitter<Item>;
 
   get rootAudioUri(): string {
     return this._rootAudioUri;
@@ -46,6 +47,7 @@
     private ref: ChangeDetectorRef,
     @Inject('DimensionObservable') private onResize: Observable<Dimension>
   ) {
+    this.removeItem = new EventEmitter<Item>();
     this.timelines = new Map();
     this.onResize.subscribe(dim => {
       this.lastWidth = this.width;