akkoma-fe/src/components/user_card/user_card.js

31 lines
579 B
JavaScript
Raw Normal View History

2017-08-21 17:25:01 +00:00
import UserCardContent from '../user_card_content/user_card_content.vue'
const UserCard = {
props: [
'user',
2018-06-07 00:58:44 +00:00
'showFollows',
'showApproval'
2017-08-21 17:25:01 +00:00
],
data () {
return {
userExpanded: false
}
},
components: {
UserCardContent
},
methods: {
toggleUserExpanded () {
this.userExpanded = !this.userExpanded
2018-06-07 00:58:44 +00:00
},
approveUser () {
this.$store.state.api.backendInteractor.approveUser(this.user.id)
},
denyUser () {
this.$store.state.api.backendInteractor.denyUser(this.user.id)
2017-08-21 17:25:01 +00:00
}
}
}
export default UserCard