diff --git a/backend/src/models/Post.js b/backend/src/models/Post.js index 14171b88b..bd6eda2e4 100644 --- a/backend/src/models/Post.js +++ b/backend/src/models/Post.js @@ -39,6 +39,6 @@ module.exports = { default: () => new Date().toISOString(), }, language: { type: 'string', allow: [null] }, - blurImage: { type: 'boolean', default: false }, + imageBlurred: { type: 'boolean', default: false }, imageAspectRatio: { type: 'float', default: 1.0 }, } diff --git a/backend/src/schema/resolvers/posts.js b/backend/src/schema/resolvers/posts.js index 3eeab182c..31c02a4e8 100644 --- a/backend/src/schema/resolvers/posts.js +++ b/backend/src/schema/resolvers/posts.js @@ -316,7 +316,7 @@ export default { 'language', 'pinnedAt', 'pinned', - 'blurImage', + 'imageBlurred', 'imageAspectRatio', ], hasMany: { diff --git a/backend/src/schema/types/type/Post.gql b/backend/src/schema/types/type/Post.gql index d028767e3..2e4358b3e 100644 --- a/backend/src/schema/types/type/Post.gql +++ b/backend/src/schema/types/type/Post.gql @@ -82,7 +82,7 @@ input _PostFilter { emotions_none: _PostEMOTEDFilter emotions_single: _PostEMOTEDFilter emotions_every: _PostEMOTEDFilter - blurImage: Boolean + imageBlurred: Boolean } enum _PostOrdering { @@ -128,7 +128,7 @@ type Post { createdAt: String updatedAt: String language: String - blurImage: Boolean + imageBlurred: Boolean pinnedAt: String @cypher( statement: "MATCH (this)<-[pinned:PINNED]-(:User) WHERE NOT this.deleted = true AND NOT this.disabled = true RETURN pinned.createdAt" ) @@ -184,7 +184,7 @@ type Mutation { language: String categoryIds: [ID] contentExcerpt: String - blurImage: Boolean + imageBlurred: Boolean imageAspectRatio: Float ): Post UpdatePost( @@ -198,7 +198,7 @@ type Mutation { visibility: Visibility language: String categoryIds: [ID] - blurImage: Boolean + imageBlurred: Boolean imageAspectRatio: Float ): Post DeletePost(id: ID!): Post @@ -220,7 +220,7 @@ type Query { createdAt: String updatedAt: String language: String - blurImage: Boolean + imageBlurred: Boolean first: Int offset: Int orderBy: [_PostOrdering] diff --git a/backend/src/seed/seed-db.js b/backend/src/seed/seed-db.js index 6ae3e4806..56f85470e 100644 --- a/backend/src/seed/seed-db.js +++ b/backend/src/seed/seed-db.js @@ -352,7 +352,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] language: sample(languages), image: faker.image.unsplash.food(300, 169), categoryIds: ['cat16'], - blurImage: true, + imageBlurred: true, imageAspectRatio: 300 / 169, }), factory.create('Post', { @@ -361,7 +361,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] language: sample(languages), image: faker.image.unsplash.technology(300, 1500), categoryIds: ['cat1'], - blurImage: false, + imageBlurred: false, imageAspectRatio: 300 / 1500, }), factory.create('Post', { @@ -369,21 +369,21 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] id: 'p3', language: sample(languages), categoryIds: ['cat3'], - blurImage: false, + imageBlurred: false, }), factory.create('Post', { author: dewey, id: 'p4', language: sample(languages), categoryIds: ['cat4'], - blurImage: false, + imageBlurred: false, }), factory.create('Post', { author: louie, id: 'p5', language: sample(languages), categoryIds: ['cat5'], - blurImage: false, + imageBlurred: false, }), factory.create('Post', { authorId: 'u1', @@ -391,7 +391,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] language: sample(languages), image: faker.image.unsplash.buildings(300, 857), categoryIds: ['cat6'], - blurImage: false, + imageBlurred: false, imageAspectRatio: 300 / 857, }), factory.create('Post', { @@ -399,13 +399,13 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] id: 'p9', language: sample(languages), categoryIds: ['cat9'], - blurImage: false, + imageBlurred: false, }), factory.create('Post', { author: dewey, id: 'p10', categoryIds: ['cat10'], - blurImage: true, + imageBlurred: true, }), factory.create('Post', { author: louie, @@ -413,7 +413,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] language: sample(languages), image: faker.image.unsplash.people(300, 901), categoryIds: ['cat11'], - blurImage: false, + imageBlurred: false, imageAspectRatio: 300 / 901, }), factory.create('Post', { @@ -421,7 +421,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] id: 'p13', language: sample(languages), categoryIds: ['cat13'], - blurImage: false, + imageBlurred: false, }), factory.create('Post', { author: jennyRostock, @@ -429,7 +429,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] language: sample(languages), image: faker.image.unsplash.objects(300, 200), categoryIds: ['cat14'], - blurImage: false, + imageBlurred: false, imageAspectRatio: 300 / 450, }), factory.create('Post', { @@ -437,7 +437,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] id: 'p15', language: sample(languages), categoryIds: ['cat15'], - blurImage: false, + imageBlurred: false, }), ]) @@ -456,7 +456,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] $title: String! $content: String! $categoryIds: [ID] - $blurImage: Boolean + $imageBlurred: Boolean $imageAspectRatio: Float ) { CreatePost( @@ -464,7 +464,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] title: $title content: $content categoryIds: $categoryIds - blurImage: $blurImage + imageBlurred: $imageBlurred imageAspectRatio: $imageAspectRatio ) { id @@ -480,7 +480,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] title: `Nature Philosophy Yoga`, content: hashtag1, categoryIds: ['cat2'], - blurImage: false, + imageBlurred: false, imageAspectRatio: 300 / 200, }, }), @@ -491,7 +491,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] title: 'This is post #7', content: `${mention1} ${faker.lorem.paragraph()}`, categoryIds: ['cat7'], - blurImage: false, + imageBlurred: false, imageAspectRatio: 300 / 180, }, }), @@ -503,7 +503,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] title: `Quantum Flow Theory explains Quantum Gravity`, content: hashtagAndMention1, categoryIds: ['cat8'], - blurImage: false, + imageBlurred: false, imageAspectRatio: 300 / 900, }, }), @@ -514,7 +514,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] title: 'This is post #12', content: `${mention2} ${faker.lorem.paragraph()}`, categoryIds: ['cat12'], - blurImage: false, + imageBlurred: false, imageAspectRatio: 300 / 200, }, }), diff --git a/webapp/components/ContributionForm/ContributionForm.spec.js b/webapp/components/ContributionForm/ContributionForm.spec.js index 9a76863fd..2f0f2e30d 100644 --- a/webapp/components/ContributionForm/ContributionForm.spec.js +++ b/webapp/components/ContributionForm/ContributionForm.spec.js @@ -200,7 +200,7 @@ describe('ContributionForm.vue', () => { imageUpload: null, imageAspectRatio: null, image: null, - blurImage: false, + imageBlurred: false, }, } postTitleInput = wrapper.find('.ds-input') diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index cdbb5701b..0d5262248 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -170,7 +170,7 @@ export default { ? languageOptions.find(o => this.contribution.language === o.value) : null form.categoryIds = this.categoryIds(this.contribution.categories) - form.checkbox = this.contribution.blurImage + form.checkbox = this.contribution.imageBlurred } return { @@ -234,7 +234,7 @@ export default { language, image, imageUpload: teaserImage, - blurImage: this.blurImage, + imageBlurred: this.blurImage, imageAspectRatio, }, }) diff --git a/webapp/components/PostCard/PostCard.vue b/webapp/components/PostCard/PostCard.vue index ad5a68388..0b7632ec3 100644 --- a/webapp/components/PostCard/PostCard.vue +++ b/webapp/components/PostCard/PostCard.vue @@ -6,7 +6,7 @@ 'post-card': true, 'disabled-content': post.disabled, '--pinned': isPinned, - '--blur-image': post.blurImage, + '--blur-image': post.imageBlurred, }" > diff --git a/webapp/graphql/Fragments.js b/webapp/graphql/Fragments.js index f7d3fb3e8..2e8748400 100644 --- a/webapp/graphql/Fragments.js +++ b/webapp/graphql/Fragments.js @@ -54,7 +54,7 @@ export const postFragment = lang => gql` slug image language - blurImage + imageBlurred author { ...user } diff --git a/webapp/graphql/PostMutations.js b/webapp/graphql/PostMutations.js index 5d6ea0f27..e754be037 100644 --- a/webapp/graphql/PostMutations.js +++ b/webapp/graphql/PostMutations.js @@ -9,7 +9,7 @@ export default () => { $language: String $categoryIds: [ID] $imageUpload: Upload - $blurImage: Boolean + $imageBlurred: Boolean $imageAspectRatio: Float ) { CreatePost( @@ -18,7 +18,7 @@ export default () => { language: $language categoryIds: $categoryIds imageUpload: $imageUpload - blurImage: $blurImage + imageBlurred: $imageBlurred imageAspectRatio: $imageAspectRatio ) { title @@ -26,7 +26,7 @@ export default () => { content contentExcerpt language - blurImage + imageBlurred } } `, @@ -39,7 +39,7 @@ export default () => { $imageUpload: Upload $categoryIds: [ID] $image: String - $blurImage: Boolean + $imageBlurred: Boolean $imageAspectRatio: Float ) { UpdatePost( @@ -50,7 +50,7 @@ export default () => { imageUpload: $imageUpload categoryIds: $categoryIds image: $image - blurImage: $blurImage + imageBlurred: $imageBlurred imageAspectRatio: $imageAspectRatio ) { id @@ -59,7 +59,7 @@ export default () => { content contentExcerpt language - blurImage + imageBlurred pinnedBy { id name diff --git a/webapp/pages/post/_id/_slug/index.vue b/webapp/pages/post/_id/_slug/index.vue index d7e4a0006..e0affdcb2 100644 --- a/webapp/pages/post/_id/_slug/index.vue +++ b/webapp/pages/post/_id/_slug/index.vue @@ -10,7 +10,7 @@ '--blur-image': blurred, }" > -