mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Show status of follows and shouts for currently logged in user
This commit is contained in:
parent
fe99629fe8
commit
76c4e4cd8f
@ -107,6 +107,7 @@
|
||||
<ds-flex-item :width="{base: 3}">
|
||||
<hc-follow-button
|
||||
:follow-id="author.id"
|
||||
:is-followed="author.followedByCurrentUser"
|
||||
@update="voted = true"
|
||||
/>
|
||||
</ds-flex-item>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<ds-button
|
||||
:disabled="disabled || !followId"
|
||||
:disabled="disabled || !followId || isFollowed"
|
||||
:loading="loading"
|
||||
icon="plus"
|
||||
primary
|
||||
@ -18,7 +18,8 @@ export default {
|
||||
name: 'HcFollowButton',
|
||||
|
||||
props: {
|
||||
followId: { type: String, default: null }
|
||||
followId: { type: String, default: null },
|
||||
isFollowed: { type: Boolean, default: false }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
style="text-align: center"
|
||||
>
|
||||
<ds-button
|
||||
:disabled="disabled || loading"
|
||||
:disabled="disabled || loading || isShouted"
|
||||
danger
|
||||
size="x-large"
|
||||
icon="bullhorn"
|
||||
@ -28,7 +28,8 @@ import gql from 'graphql-tag'
|
||||
export default {
|
||||
props: {
|
||||
count: { type: Number, default: 0 },
|
||||
postId: { type: String, default: null }
|
||||
postId: { type: String, default: null },
|
||||
isShouted: { type: Boolean, default: false }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@ -29,6 +29,7 @@ export default app => {
|
||||
slug
|
||||
avatar
|
||||
followedByCount
|
||||
followedByCurrentUser
|
||||
contributionsCount
|
||||
commentsCount
|
||||
badges {
|
||||
@ -41,12 +42,14 @@ export default app => {
|
||||
}
|
||||
}
|
||||
followedByCount
|
||||
followedByCurrentUser
|
||||
followedBy(first: 7) {
|
||||
id
|
||||
name
|
||||
slug
|
||||
avatar
|
||||
followedByCount
|
||||
followedByCurrentUser
|
||||
contributionsCount
|
||||
commentsCount
|
||||
badges {
|
||||
|
||||
@ -108,6 +108,7 @@ export default {
|
||||
shoutedCount
|
||||
commentsCount
|
||||
followedByCount
|
||||
followedByCurrentUser
|
||||
location {
|
||||
name: name${this.$i18n.locale().toUpperCase()}
|
||||
}
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
<hc-shout-button
|
||||
v-if="post.author"
|
||||
:count="post.shoutedCount"
|
||||
:is-shouted="post.shoutedByCurrentUser"
|
||||
:post-id="post.id"
|
||||
/>
|
||||
<!-- Categories -->
|
||||
@ -188,6 +189,7 @@ export default {
|
||||
contributionsCount
|
||||
commentsCount
|
||||
followedByCount
|
||||
followedByCurrentUser
|
||||
location {
|
||||
name: name${this.$i18n.locale().toUpperCase()}
|
||||
}
|
||||
@ -215,6 +217,7 @@ export default {
|
||||
contributionsCount
|
||||
commentsCount
|
||||
followedByCount
|
||||
followedByCurrentUser
|
||||
location {
|
||||
name: name${this.$i18n.locale().toUpperCase()}
|
||||
}
|
||||
@ -231,6 +234,7 @@ export default {
|
||||
icon
|
||||
}
|
||||
shoutedCount
|
||||
shoutedByCurrentUser
|
||||
}
|
||||
}
|
||||
`)
|
||||
|
||||
@ -109,6 +109,7 @@ export default {
|
||||
avatar
|
||||
contributionsCount
|
||||
followedByCount
|
||||
followedByCurrentUser
|
||||
commentsCount
|
||||
location {
|
||||
name: name${this.$i18n.locale().toUpperCase()}
|
||||
|
||||
@ -86,6 +86,7 @@
|
||||
<hc-follow-button
|
||||
v-if="!myProfile"
|
||||
:follow-id="user.id"
|
||||
:is-followed="user.followedByCurrentUser"
|
||||
@update="voted = true && fetchUser()"
|
||||
/>
|
||||
</ds-space>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user