make relationships separate from users
This commit is contained in:
parent
d5457c323a
commit
6bb75a3a6d
25 changed files with 112 additions and 81 deletions
|
@ -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.state.users.relationships[this.userId] || {}
|
||||
},
|
||||
classes () {
|
||||
return [{
|
||||
'user-card-rounded-t': this.rounded === 'top', // set border-top-left-radius and border-top-right-radius
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue