diff --git a/src/pages/stream/stream.ts b/src/pages/stream/stream.ts index 75f8754..7415dc8 100644 --- a/src/pages/stream/stream.ts +++ b/src/pages/stream/stream.ts @@ -351,10 +351,14 @@ export class StreamPage { - + + -

filename

+

{{ f.name }}

+
@@ -365,6 +369,7 @@ export class NewPostModal { title: string; replyid: string; ptext: string = ""; + files: Array = []; fname: string = ""; fpath: string = ""; options: Object = {}; @@ -515,6 +520,11 @@ export class NewPostModal { type: "io.pnut.core.oembed", value: oembed }); + this.files.push({ + name: this.fname, + link: rdata.data.link, + id: this.raw.length - 1 + }); }).catch((err) => { console.log('-create file error-'); console.log(JSON.stringify(err)); @@ -531,6 +541,12 @@ export class NewPostModal { }); } + + unattach(id) { + console.log('removing item ' + id); + this.raw.splice(id, 1); + this.files.splice(id, 1); + } } @Component({