updated FollowCard component

This commit is contained in:
Maksim Pechnikov 2019-10-17 16:19:52 +03:00
parent d2079ecef4
commit 60828f119c
4 changed files with 12 additions and 50 deletions
src/components/follow_button

View file

@ -1,6 +1,6 @@
import { requestFollow, requestUnfollow } from '../../services/follow_manipulate/follow_manipulate'
export default {
props: ['user'],
props: ['user', 'labelFollowing', 'buttonClass'],
data () {
return {
inProgress: false
@ -23,7 +23,7 @@ export default {
if (this.inProgress) {
return this.$t('user_card.follow_progress')
} else if (this.user.following) {
return this.$t('user_card.following')
return this.labelFollowing || this.$t('user_card.following')
} else if (this.user.requested) {
return this.$t('user_card.follow_sent')
} else {

View file

@ -1,7 +1,7 @@
<template>
<button
class="btn btn-default follow-button"
:class="{ pressed: isPressed }"
:class="[buttonClass, { pressed: isPressed}]"
:disabled="inProgress"
:title="title"
@click="onClick"