From a62d59741b347141c13126d496b971e2053e5cd7 Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 6 Dec 2019 09:16:14 +0100 Subject: [PATCH] fix and changes revies, fix lint --- .../ContributionForm/ContributionForm.spec.js | 1 - .../ContributionForm/ContributionForm.vue | 37 +++++-------------- webapp/components/PostCard/PostCard.vue | 3 +- webapp/pages/post/_id/_slug/index.vue | 32 ++++++++-------- 4 files changed, 26 insertions(+), 47 deletions(-) diff --git a/webapp/components/ContributionForm/ContributionForm.spec.js b/webapp/components/ContributionForm/ContributionForm.spec.js index c8d36459e..c84700106 100644 --- a/webapp/components/ContributionForm/ContributionForm.spec.js +++ b/webapp/components/ContributionForm/ContributionForm.spec.js @@ -249,7 +249,6 @@ describe('ContributionForm.vue', () => { wrapper.find(TeaserImage).vm.$emit('addTeaserImage', imageUpload) expect(wrapper.find('.images-set-blur').exists()).toBe(false) await wrapper.find('input[type="checkbox"]').trigger('click') - expect(wrapper.find('input[type="checkbox"]').exists()).toBe(true) expect(wrapper.find('.images-set-blur').exists()).toBe(true) }) }) diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index 5d6ff1351..f2ec8327e 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -10,7 +10,7 @@ -
- +
+
@@ -45,8 +38,8 @@ class="blurImageCheckbox" type="checkbox" id="blur_img" - v-model="checkedBlur" - @change="form.checkbox = checkedBlur" + v-model="blurImage" + @change="form.checkbox = blurImage" /> @@ -223,13 +216,13 @@ export default { contentMin: 3, hashtags: [], elem: null, - checkedBlur: false, + blurImage: false, } }, created() {}, mounted() { if (this.contribution && this.contribution.blurImage === true) { - this.checkedBlur = true + this.blurImage = true } }, computed: { @@ -242,8 +235,8 @@ export default { }, methods: { unBlur() { - if (this.checkedBlur) { - this.checkedBlur = false + if (this.blurImage) { + this.blurImage = false } }, submit() { @@ -335,18 +328,6 @@ export default {