mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
fix: delete picture and thumbnail in post
This commit is contained in:
parent
af760c17ea
commit
75753444ea
@ -10,10 +10,11 @@
|
||||
<ds-button
|
||||
@click.prevent="deleteImage"
|
||||
icon="close"
|
||||
v-if="showDeleteButton"
|
||||
v-if="contribution.image || form.teaserImage"
|
||||
class="delete-image"
|
||||
></ds-button>
|
||||
<hc-teaser-image
|
||||
ref="deleteImage"
|
||||
:contribution="contribution"
|
||||
@addTeaserImage="addTeaserImage"
|
||||
:class="{ '--blur-image': form.blurImage }"
|
||||
@ -204,7 +205,6 @@ export default {
|
||||
users: [],
|
||||
contentMin: 3,
|
||||
hashtags: [],
|
||||
showDeleteButton: !!this.contribution,
|
||||
elem: null,
|
||||
}
|
||||
},
|
||||
@ -272,9 +272,10 @@ export default {
|
||||
return categories.map(c => 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: {
|
||||
|
||||
@ -71,6 +71,9 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
deleteImage() {
|
||||
this.clearImages()
|
||||
},
|
||||
template() {
|
||||
return `<div class="dz-preview dz-file-preview">
|
||||
<div class="dz-image">
|
||||
@ -207,7 +210,7 @@ export default {
|
||||
}
|
||||
|
||||
.hc-drag-marker-update-post {
|
||||
opacity: 0;
|
||||
opacity: 0.1;
|
||||
}
|
||||
|
||||
.contribution-form-footer {
|
||||
|
||||
@ -157,7 +157,6 @@ export default {
|
||||
border-radius: 100%;
|
||||
border: 1px dashed hsl(0, 0%, 25%);
|
||||
}
|
||||
|
||||
.hc-attachments-upload-area:hover & {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user