From bcc1ab167e8b1dfdac1ec0a05a0c14e8234bcabc Mon Sep 17 00:00:00 2001 From: mattwr18 Date: Thu, 30 Jan 2020 10:46:43 +0100 Subject: [PATCH] Improve styling per @alina-beck review --- backend/src/schema/resolvers/users.js | 2 +- backend/src/schema/types/type/User.gql | 2 +- backend/yarn.lock | 3 +- webapp/components/ContentMenu/ContentMenu.vue | 6 +- webapp/graphql/PostQuery.js | 2 +- webapp/graphql/User.js | 2 +- webapp/graphql/settings/BlockedUsers.js | 4 +- webapp/pages/post/_id/_slug/index.vue | 4 +- webapp/pages/profile/_id/_slug.vue | 49 ++++--- webapp/pages/settings/blocked-users.vue | 2 +- webapp/yarn.lock | 125 ------------------ 11 files changed, 36 insertions(+), 165 deletions(-) diff --git a/backend/src/schema/resolvers/users.js b/backend/src/schema/resolvers/users.js index 915d8b6f8..2874a11fc 100644 --- a/backend/src/schema/resolvers/users.js +++ b/backend/src/schema/resolvers/users.js @@ -251,7 +251,7 @@ export default { boolean: { followedByCurrentUser: 'MATCH (this)<-[:FOLLOWS]-(u:User {id: $cypherParams.currentUserId}) RETURN COUNT(u) >= 1', - isBlocked: + blocked: 'MATCH (this)<-[:BLOCKED]-(u:User {id: $cypherParams.currentUserId}) RETURN COUNT(u) >= 1', isMuted: 'MATCH (this)<-[:MUTED]-(u:User {id: $cypherParams.currentUserId}) RETURN COUNT(u) >= 1', diff --git a/backend/src/schema/types/type/User.gql b/backend/src/schema/types/type/User.gql index 59a590d4d..71cc1edb0 100644 --- a/backend/src/schema/types/type/User.gql +++ b/backend/src/schema/types/type/User.gql @@ -69,7 +69,7 @@ type User { """ ) - isBlocked: Boolean! @cypher( + blocked: Boolean! @cypher( statement: """ MATCH (this)-[:BLOCKED]-(user:User {id: $cypherParams.currentUserId}) RETURN COUNT(user) >= 1 diff --git a/backend/yarn.lock b/backend/yarn.lock index 5749c5639..a53444abd 100644 --- a/backend/yarn.lock +++ b/backend/yarn.lock @@ -1137,7 +1137,7 @@ url-regex "~4.1.1" video-extensions "~1.1.0" -"@metascraper/helpers@^5.10.3", "@metascraper/helpers@^5.10.5": +"@metascraper/helpers@^5.10.5": version "5.10.5" resolved "https://registry.yarnpkg.com/@metascraper/helpers/-/helpers-5.10.5.tgz#c3558533f30144bacecf9599fd02ac88d839a0cc" integrity sha512-noTBDk3cF3UzKoPrC9/Sye1f9945PVEDju6br7S19YWyUpceEXoDrPF1YaqN37ku62f1s7bul11+Lv/xAYuEVQ== @@ -3872,7 +3872,6 @@ extsprintf@^1.2.0: faker@Marak/faker.js#master: version "4.1.0" - uid "3b2fa4aebccee52ae1bafc15d575061fb30c3cf1" resolved "https://codeload.github.com/Marak/faker.js/tar.gz/3b2fa4aebccee52ae1bafc15d575061fb30c3cf1" fast-deep-equal@^2.0.1: diff --git a/webapp/components/ContentMenu/ContentMenu.vue b/webapp/components/ContentMenu/ContentMenu.vue index 31d90a614..5ce73c461 100644 --- a/webapp/components/ContentMenu/ContentMenu.vue +++ b/webapp/components/ContentMenu/ContentMenu.vue @@ -161,7 +161,7 @@ export default { callback: () => { this.$emit('unmute', this.resource) }, - icon: 'user-plus', + icon: 'eye', }) } else { routes.push({ @@ -169,10 +169,10 @@ export default { callback: () => { this.$emit('mute', this.resource) }, - icon: 'user-times', + icon: 'eye-slash', }) } - if (this.resource.isBlocked) { + if (this.resource.blocked) { routes.push({ label: this.$t(`settings.blocked-users.unblock`), callback: () => { diff --git a/webapp/graphql/PostQuery.js b/webapp/graphql/PostQuery.js index a3ac8345a..5ddac9c1f 100644 --- a/webapp/graphql/PostQuery.js +++ b/webapp/graphql/PostQuery.js @@ -29,7 +29,7 @@ export default i18n => { ...user ...userCounts ...locationAndBadges - isBlocked + blocked } comments(orderBy: createdAt_asc) { ...comment diff --git a/webapp/graphql/User.js b/webapp/graphql/User.js index 6bc680fc9..a73941794 100644 --- a/webapp/graphql/User.js +++ b/webapp/graphql/User.js @@ -24,7 +24,7 @@ export default i18n => { createdAt followedByCurrentUser isMuted - isBlocked + blocked following(first: 7) { ...user ...userCounts diff --git a/webapp/graphql/settings/BlockedUsers.js b/webapp/graphql/settings/BlockedUsers.js index 7fb4cc9f2..94f2121b1 100644 --- a/webapp/graphql/settings/BlockedUsers.js +++ b/webapp/graphql/settings/BlockedUsers.js @@ -22,7 +22,7 @@ export const blockUser = () => { blockUser(id: $id) { id name - isBlocked + blocked followedByCurrentUser } } @@ -35,7 +35,7 @@ export const unblockUser = () => { unblockUser(id: $id) { id name - isBlocked + blocked followedByCurrentUser } } diff --git a/webapp/pages/post/_id/_slug/index.vue b/webapp/pages/post/_id/_slug/index.vue index 9d42dd475..c8a2d910d 100644 --- a/webapp/pages/post/_id/_slug/index.vue +++ b/webapp/pages/post/_id/_slug/index.vue @@ -91,7 +91,7 @@ /> @@ -99,7 +99,7 @@ {{ $t('settings.blocked-users.explanation.commenting-disabled') }}
{{ $t('settings.blocked-users.explanation.commenting-explanation') }} - FAQ + FAQ diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue index f83d5bed5..80471fff4 100644 --- a/webapp/pages/profile/_id/_slug.vue +++ b/webapp/pages/profile/_id/_slug.vue @@ -66,27 +66,21 @@ - - - +
+ + {{ $t('settings.blocked-users.unblock') }} + + + {{ $t('settings.muted-users.unmute') }} + + +