From 75753444ea8e1d581e1305fa60f8817a4ea6085b Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 15 Jan 2020 18:48:37 +0100 Subject: [PATCH] fix: delete picture and thumbnail in post --- webapp/components/ContributionForm/ContributionForm.vue | 9 +++++---- webapp/components/TeaserImage/TeaserImage.vue | 5 ++++- webapp/components/Upload/index.vue | 1 - 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index a38d59181..e836b7aef 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -10,10 +10,11 @@ c.id) }, deleteImage() { - this.form.image = null this.contribution.image = null - this.showDeleteButton = false + this.form.image = null + this.form.teaserImage = null + this.$refs.deleteImage.deleteImage() }, }, apollo: { diff --git a/webapp/components/TeaserImage/TeaserImage.vue b/webapp/components/TeaserImage/TeaserImage.vue index d5913665b..70efe6d54 100644 --- a/webapp/components/TeaserImage/TeaserImage.vue +++ b/webapp/components/TeaserImage/TeaserImage.vue @@ -71,6 +71,9 @@ export default { }, }, methods: { + deleteImage() { + this.clearImages() + }, template() { return `
@@ -207,7 +210,7 @@ export default { } .hc-drag-marker-update-post { - opacity: 0; + opacity: 0.1; } .contribution-form-footer { diff --git a/webapp/components/Upload/index.vue b/webapp/components/Upload/index.vue index 66e7203cc..c78b4649b 100644 --- a/webapp/components/Upload/index.vue +++ b/webapp/components/Upload/index.vue @@ -157,7 +157,6 @@ export default { border-radius: 100%; border: 1px dashed hsl(0, 0%, 25%); } - .hc-attachments-upload-area:hover & { opacity: 1; }