Attachments can now be removed in Composer

Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
pull/657/head
Cyrille Bollu 2019-08-26 11:04:53 +02:00
rodzic a00090254c
commit 2e56fef2fd
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -81,7 +81,7 @@
<masonry>
<div v-for="(item, index) in miniatures" :key="index">
<img :src="item">
<img :src="item" @click="removeAttachment(index)">
</div>
</masonry>
@ -653,6 +653,11 @@ export default {
}
reader.readAsDataURL(file)
},
removeAttachment(idx) {
console.log("removing attachment", idx)
this.postAttachments.splice(idx,1)
this.miniatures.splice(idx,1)
},
insert(emoji) {
if (typeof emoji === 'object') {
let category = Object.keys(emoji)[0]