mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Improve styling per @alina-beck review
This commit is contained in:
parent
bbb4dd56cd
commit
bcc1ab167e
@ -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',
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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: () => {
|
||||
|
||||
@ -29,7 +29,7 @@ export default i18n => {
|
||||
...user
|
||||
...userCounts
|
||||
...locationAndBadges
|
||||
isBlocked
|
||||
blocked
|
||||
}
|
||||
comments(orderBy: createdAt_asc) {
|
||||
...comment
|
||||
|
||||
@ -24,7 +24,7 @@ export default i18n => {
|
||||
createdAt
|
||||
followedByCurrentUser
|
||||
isMuted
|
||||
isBlocked
|
||||
blocked
|
||||
following(first: 7) {
|
||||
...user
|
||||
...userCounts
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@
|
||||
/>
|
||||
<ds-space margin-bottom="large" />
|
||||
<comment-form
|
||||
v-if="showNewCommentForm && !post.author.isBlocked"
|
||||
v-if="showNewCommentForm && !post.author.blocked"
|
||||
:post="post"
|
||||
@createComment="createComment"
|
||||
/>
|
||||
@ -99,7 +99,7 @@
|
||||
{{ $t('settings.blocked-users.explanation.commenting-disabled') }}
|
||||
<br />
|
||||
{{ $t('settings.blocked-users.explanation.commenting-explanation') }}
|
||||
<a href="https://support.human-connection.org/kb/">FAQ</a>
|
||||
<a href="https://support.human-connection.org/kb/" target="_blank">FAQ</a>
|
||||
</ds-placeholder>
|
||||
</ds-section>
|
||||
</ds-card>
|
||||
|
||||
@ -66,27 +66,21 @@
|
||||
</client-only>
|
||||
</ds-flex-item>
|
||||
</ds-flex>
|
||||
<ds-space margin="small">
|
||||
<template v-if="!myProfile">
|
||||
<base-button
|
||||
v-if="user.isBlocked"
|
||||
@click="unblockUser(user)"
|
||||
class="unblock-user-button"
|
||||
>
|
||||
{{ $t('settings.blocked-users.unblock') }}
|
||||
</base-button>
|
||||
<base-button v-if="user.isMuted" @click="unmuteUser(user)" class="unmute-user-button">
|
||||
{{ $t('settings.muted-users.unmute') }}
|
||||
</base-button>
|
||||
<hc-follow-button
|
||||
v-if="!(user.isBlocked || user.isMuted)"
|
||||
:follow-id="user.id"
|
||||
:is-followed="user.followedByCurrentUser"
|
||||
@optimistic="optimisticFollow"
|
||||
@update="updateFollow"
|
||||
/>
|
||||
</template>
|
||||
</ds-space>
|
||||
<div v-if="!myProfile" class="action-buttons">
|
||||
<base-button v-if="user.blocked" @click="unblockUser(user)">
|
||||
{{ $t('settings.blocked-users.unblock') }}
|
||||
</base-button>
|
||||
<base-button v-if="user.isMuted" @click="unmuteUser(user)">
|
||||
{{ $t('settings.muted-users.unmute') }}
|
||||
</base-button>
|
||||
<hc-follow-button
|
||||
v-if="!(user.blocked || user.isMuted)"
|
||||
:follow-id="user.id"
|
||||
:is-followed="user.followedByCurrentUser"
|
||||
@optimistic="optimisticFollow"
|
||||
@update="updateFollow"
|
||||
/>
|
||||
</div>
|
||||
<template v-if="user.about">
|
||||
<hr />
|
||||
<ds-space margin-top="small" margin-bottom="small">
|
||||
@ -587,10 +581,13 @@ export default {
|
||||
.profile-post-add-button {
|
||||
box-shadow: $box-shadow-x-large;
|
||||
}
|
||||
.unblock-user-button,
|
||||
.unmute-user-button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-bottom: $space-x-small;
|
||||
.action-buttons {
|
||||
margin: $space-small 0;
|
||||
|
||||
> .base-button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-bottom: $space-x-small;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -105,7 +105,7 @@ export default {
|
||||
})
|
||||
this.$apollo.queries.blockedUsers.refetch()
|
||||
const { name } = user.row
|
||||
this.$toast.success(this.$t('settings.blocked-users.unmuted', { name }))
|
||||
this.$toast.success(this.$t('settings.blocked-user.unblocked', { name }))
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
125
webapp/yarn.lock
125
webapp/yarn.lock
@ -2219,19 +2219,6 @@
|
||||
global "^4.3.2"
|
||||
util-deprecate "^1.0.2"
|
||||
|
||||
"@storybook/addons@5.3.6":
|
||||
version "5.3.6"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-5.3.6.tgz#93c5492f09b54cee4885192a0fa79465aa91751f"
|
||||
integrity sha512-WXsIWOO9/0ydl0C2cGwGd6qrd4L49SoXLNiErDxmjIgLXOVicylCC3JRsExcBOlvmcfPpQniBDNFTXnl6NUldw==
|
||||
dependencies:
|
||||
"@storybook/api" "5.3.6"
|
||||
"@storybook/channels" "5.3.6"
|
||||
"@storybook/client-logger" "5.3.6"
|
||||
"@storybook/core-events" "5.3.6"
|
||||
core-js "^3.0.1"
|
||||
global "^4.3.2"
|
||||
util-deprecate "^1.0.2"
|
||||
|
||||
"@storybook/addons@5.3.7":
|
||||
version "5.3.7"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-5.3.7.tgz#4b4502d916dd878762d09c6c2aa1bc5191ae94be"
|
||||
@ -2268,32 +2255,6 @@
|
||||
telejson "^3.0.2"
|
||||
util-deprecate "^1.0.2"
|
||||
|
||||
"@storybook/api@5.3.6":
|
||||
version "5.3.6"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/api/-/api-5.3.6.tgz#687b58cf31994304d0262f873e611b283b6603a4"
|
||||
integrity sha512-ka05nIo+KGR1kaZZUqQ0Mmn9wVgXGi7yYzfAdtdqrK2WB2xBt78pEHU00U84Qav4rk85g/U68b7tek+oE1wmUw==
|
||||
dependencies:
|
||||
"@reach/router" "^1.2.1"
|
||||
"@storybook/channels" "5.3.6"
|
||||
"@storybook/client-logger" "5.3.6"
|
||||
"@storybook/core-events" "5.3.6"
|
||||
"@storybook/csf" "0.0.1"
|
||||
"@storybook/router" "5.3.6"
|
||||
"@storybook/theming" "5.3.6"
|
||||
"@types/reach__router" "^1.2.3"
|
||||
core-js "^3.0.1"
|
||||
fast-deep-equal "^2.0.1"
|
||||
global "^4.3.2"
|
||||
lodash "^4.17.15"
|
||||
memoizerific "^1.11.3"
|
||||
prop-types "^15.6.2"
|
||||
react "^16.8.3"
|
||||
semver "^6.0.0"
|
||||
shallow-equal "^1.1.0"
|
||||
store2 "^2.7.1"
|
||||
telejson "^3.2.0"
|
||||
util-deprecate "^1.0.2"
|
||||
|
||||
"@storybook/api@5.3.7":
|
||||
version "5.3.7"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/api/-/api-5.3.7.tgz#fa9126d851d506607d1ba93588d3599b9b9ea0b9"
|
||||
@ -2338,13 +2299,6 @@
|
||||
dependencies:
|
||||
core-js "^3.0.1"
|
||||
|
||||
"@storybook/channels@5.3.6":
|
||||
version "5.3.6"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-5.3.6.tgz#ed4a504fb64829d6d1bdb2ee3d48b70a33847b73"
|
||||
integrity sha512-di3BcoM/O1MR749TW7NDI5q3IXAF4Tqt73CVWOLqc/ZE4c/a70rGJ8rHbWKRfXBdJlgvEU7e82SmJz0MiW0A5Q==
|
||||
dependencies:
|
||||
core-js "^3.0.1"
|
||||
|
||||
"@storybook/channels@5.3.7":
|
||||
version "5.3.7"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-5.3.7.tgz#19a47c11cda72f98d7d1dc05e78c1e40bdc2bbdf"
|
||||
@ -2381,13 +2335,6 @@
|
||||
dependencies:
|
||||
core-js "^3.0.1"
|
||||
|
||||
"@storybook/client-logger@5.3.6":
|
||||
version "5.3.6"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.3.6.tgz#d37ac813701e8a3cc1e25b6ec017808142a421a0"
|
||||
integrity sha512-B9FOMLJOmqgibxfPY9yEKXZjNWoSZ9uW7tzdwTFydvcXVf3hSGdJa102w0jEGmgautRRRQOnJ1MXkVJlMnI3MQ==
|
||||
dependencies:
|
||||
core-js "^3.0.1"
|
||||
|
||||
"@storybook/client-logger@5.3.7":
|
||||
version "5.3.7"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.3.7.tgz#ee258a8ba0121b579c719b878e3635d6ff020abd"
|
||||
@ -2420,33 +2367,6 @@
|
||||
react-textarea-autosize "^7.1.0"
|
||||
simplebar-react "^1.0.0-alpha.6"
|
||||
|
||||
"@storybook/components@5.3.6":
|
||||
version "5.3.6"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.3.6.tgz#6fe38ac9ba62c982842bfcb06690c3f4fef8be06"
|
||||
integrity sha512-9XhQyTF884XFdCdsJT2/xRTmMW2a1CBpZCHHC/Xvs85AZ9YeLcp7eDfeu72KMa7FApKH5wuh4JiY5nBgmkQShg==
|
||||
dependencies:
|
||||
"@storybook/client-logger" "5.3.6"
|
||||
"@storybook/theming" "5.3.6"
|
||||
"@types/react-syntax-highlighter" "11.0.2"
|
||||
"@types/react-textarea-autosize" "^4.3.3"
|
||||
core-js "^3.0.1"
|
||||
global "^4.3.2"
|
||||
lodash "^4.17.15"
|
||||
markdown-to-jsx "^6.9.1"
|
||||
memoizerific "^1.11.3"
|
||||
polished "^3.3.1"
|
||||
popper.js "^1.14.7"
|
||||
prop-types "^15.7.2"
|
||||
react "^16.8.3"
|
||||
react-dom "^16.8.3"
|
||||
react-focus-lock "^2.1.0"
|
||||
react-helmet-async "^1.0.2"
|
||||
react-popper-tooltip "^2.8.3"
|
||||
react-syntax-highlighter "^11.0.2"
|
||||
react-textarea-autosize "^7.1.0"
|
||||
simplebar-react "^1.0.0-alpha.6"
|
||||
ts-dedent "^1.1.0"
|
||||
|
||||
"@storybook/components@5.3.7":
|
||||
version "5.3.7"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.3.7.tgz#8b7361fef02f042c5bad979b4d6886863d3b6a31"
|
||||
@ -2481,13 +2401,6 @@
|
||||
dependencies:
|
||||
core-js "^3.0.1"
|
||||
|
||||
"@storybook/core-events@5.3.6":
|
||||
version "5.3.6"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-5.3.6.tgz#41760f8a61958cfa2a468084460da08339c74d9b"
|
||||
integrity sha512-EO9fyMY9O+jjPb9tKIjh+laMy33UPcejnkKq03uv82+VymwU4O9G/FW/JHzjDM0h0ycGy07/5JLfbMtXyCXT3w==
|
||||
dependencies:
|
||||
core-js "^3.0.1"
|
||||
|
||||
"@storybook/core-events@5.3.7":
|
||||
version "5.3.7"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-5.3.7.tgz#9297277ae5868b87d3cc36f08415da1579cdb8df"
|
||||
@ -2606,21 +2519,6 @@
|
||||
memoizerific "^1.11.3"
|
||||
qs "^6.6.0"
|
||||
|
||||
"@storybook/router@5.3.6":
|
||||
version "5.3.6"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/router/-/router-5.3.6.tgz#0e2dc80070b88d550303e43c333ffdf52d1cae1b"
|
||||
integrity sha512-g3gri0j2VYM0YFyERL8KGMwYbkASneOm6MZdasS6EWXdE6+piONNC5lTPk03v5Js8LJA8LPTjyNlUwfK3plJWw==
|
||||
dependencies:
|
||||
"@reach/router" "^1.2.1"
|
||||
"@storybook/csf" "0.0.1"
|
||||
"@types/reach__router" "^1.2.3"
|
||||
core-js "^3.0.1"
|
||||
global "^4.3.2"
|
||||
lodash "^4.17.15"
|
||||
memoizerific "^1.11.3"
|
||||
qs "^6.6.0"
|
||||
util-deprecate "^1.0.2"
|
||||
|
||||
"@storybook/router@5.3.7":
|
||||
version "5.3.7"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/router/-/router-5.3.7.tgz#64e06a319ada9e783029a2d3e3c6a6ddf9b5a1ad"
|
||||
@ -2654,24 +2552,6 @@
|
||||
prop-types "^15.7.2"
|
||||
resolve-from "^5.0.0"
|
||||
|
||||
"@storybook/theming@5.3.6":
|
||||
version "5.3.6"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.3.6.tgz#e37f5cbfbadb888e462d60c6db7cd6bc976a4767"
|
||||
integrity sha512-Z7T+qyrjN2ag5/djmM5adZ6CbBKdPLHGwTgyZiKi3YWbWF1KcRTk3RgK7gtgeqqEFHA6KJsD0ubZ7kqHO2e9Sg==
|
||||
dependencies:
|
||||
"@emotion/core" "^10.0.20"
|
||||
"@emotion/styled" "^10.0.17"
|
||||
"@storybook/client-logger" "5.3.6"
|
||||
core-js "^3.0.1"
|
||||
deep-object-diff "^1.1.0"
|
||||
emotion-theming "^10.0.19"
|
||||
global "^4.3.2"
|
||||
memoizerific "^1.11.3"
|
||||
polished "^3.3.1"
|
||||
prop-types "^15.7.2"
|
||||
resolve-from "^5.0.0"
|
||||
ts-dedent "^1.1.0"
|
||||
|
||||
"@storybook/theming@5.3.7":
|
||||
version "5.3.7"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.3.7.tgz#90ba738f3324f70d88ab412528a8240e9936093d"
|
||||
@ -14914,11 +14794,6 @@ serve-static@1.14.1, serve-static@^1.14.1:
|
||||
version "1.14.1"
|
||||
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9"
|
||||
integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==
|
||||
dependencies:
|
||||
encodeurl "~1.0.2"
|
||||
escape-html "~1.0.3"
|
||||
parseurl "~1.3.3"
|
||||
send "0.17.1"
|
||||
|
||||
server-destroy@^1.0.1:
|
||||
version "1.0.1"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user