diff options
| author | Henry Jameson <me@hjkos.com> | 2020-05-25 03:29:48 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2020-05-25 03:29:48 +0300 |
| commit | 138ec85003b41079e31fe618c5953b286a2b3c1e (patch) | |
| tree | ee09fdac26ba0aa5b135370ce8660781c09e2e99 /src/components/user_card | |
| parent | 1e606d2f268e796a3efd2a995713c70a000daf62 (diff) | |
| parent | 1ae8935977b2e974b6727b6a02035c9d38c9d670 (diff) | |
Merge remote-tracking branch 'origin/develop' into settings-modal
* origin/develop: (95 commits)
Translated using Weblate (Italian)
Translated using Weblate (Chinese (Simplified))
Translated using Weblate (Russian)
Translated using Weblate (Polish)
Translated using Weblate (Dutch)
Translated using Weblate (German)
Translated using Weblate (German)
Translated using Weblate (German)
Translated using Weblate (German)
Translated using Weblate (German)
Translated using Weblate (German)
Translated using Weblate (German)
Translated using Weblate (German)
Translated using Weblate (German)
Translated using Weblate (German)
Translated using Weblate (German)
Translated using Weblate (German)
Translated using Weblate (German)
Translated using Weblate (German)
Translated using Weblate (German)
...
Diffstat (limited to 'src/components/user_card')
| -rw-r--r-- | src/components/user_card/user_card.js | 8 | ||||
| -rw-r--r-- | src/components/user_card/user_card.vue | 11 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 1cdbd3fa..8e6b9d7f 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -9,7 +9,7 @@ import { mapGetters } from 'vuex' export default { props: [ - 'user', 'switcher', 'selected', 'hideBio', 'rounded', 'bordered', 'allowZoomingAvatar' + 'userId', 'switcher', 'selected', 'hideBio', 'rounded', 'bordered', 'allowZoomingAvatar' ], data () { return { @@ -21,6 +21,12 @@ export default { this.$store.dispatch('fetchUserRelationship', this.user.id) }, computed: { + user () { + return this.$store.getters.findUser(this.userId) + }, + relationship () { + return this.$store.getters.relationship(this.userId) + }, classes () { return [{ 'user-card-rounded-t': this.rounded === 'top', // set border-top-left-radius and border-top-right-radius diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index b4f275d9..c4a5ce9d 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -60,6 +60,7 @@ <AccountActions v-if="isOtherUser && loggedIn" :user="user" + :relationship="relationship" /> </div> <div class="bottom-line"> @@ -83,7 +84,7 @@ </div> <div class="user-meta"> <div - v-if="user.follows_you && loggedIn && isOtherUser" + v-if="relationship.followed_by && loggedIn && isOtherUser" class="following" > {{ $t('user_card.follows_you') }} @@ -130,10 +131,10 @@ class="user-interactions" > <div class="btn-group"> - <FollowButton :user="user" /> - <template v-if="user.following"> + <FollowButton :relationship="relationship" /> + <template v-if="relationship.following"> <ProgressButton - v-if="!user.subscribed" + v-if="!relationship.subscribing" class="btn btn-default" :click="subscribeUser" :title="$t('user_card.subscribe')" @@ -152,7 +153,7 @@ </div> <div> <button - v-if="user.muted" + v-if="relationship.muting" class="btn btn-default btn-block toggled" @click="unmuteUser" > |
