Update naming

This commit is contained in:
taehoon 2019-02-26 10:14:12 -05:00
parent 8dd42cfc65
commit 1fecac9ba6
4 changed files with 13 additions and 13 deletions

View file

@ -21,8 +21,8 @@
<slot name="secondary-area"></slot> <slot name="secondary-area"></slot>
</div> </div>
</div> </div>
<div class="user-card-third-area"> <div class="user-card-tertiary-area">
<slot name="third-area"></slot> <slot name="tertiary-area"></slot>
</div> </div>
</div> </div>
</div> </div>

View file

@ -8,7 +8,7 @@ const FollowCard = {
], ],
data () { data () {
return { return {
progress: false, inProgress: false,
requestSent: false, requestSent: false,
updated: false updated: false
} }
@ -25,17 +25,17 @@ const FollowCard = {
}, },
methods: { methods: {
followUser () { followUser () {
this.progress = true this.inProgress = true
requestFollow(this.user, this.$store).then(({ sent, updated }) => { requestFollow(this.user, this.$store).then(({ sent, updated }) => {
this.progress = false this.inProgress = false
this.requestSent = sent this.requestSent = sent
this.updated = updated this.updated = updated
}) })
}, },
unfollowUser () { unfollowUser () {
this.progress = true this.inProgress = true
requestUnfollow(this.user, this.$store).then(({ updated }) => { requestUnfollow(this.user, this.$store).then(({ updated }) => {
this.progress = false this.inProgress = false
this.updated = updated this.updated = updated
}) })
} }

View file

@ -5,10 +5,10 @@
v-if="showFollow" v-if="showFollow"
class="btn btn-default" class="btn btn-default"
@click="followUser" @click="followUser"
:disabled="progress" :disabled="inProgress"
:title="requestSent ? $t('user_card.follow_again') : ''" :title="requestSent ? $t('user_card.follow_again') : ''"
> >
<template v-if="progress"> <template v-if="inProgress">
{{ $t('user_card.follow_progress') }} {{ $t('user_card.follow_progress') }}
</template> </template>
<template v-else-if="requestSent"> <template v-else-if="requestSent">
@ -18,8 +18,8 @@
{{ $t('user_card.follow') }} {{ $t('user_card.follow') }}
</template> </template>
</button> </button>
<button v-if="following" class="btn btn-default pressed" @click="unfollowUser" :disabled="progress"> <button v-if="following" class="btn btn-default pressed" @click="unfollowUser" :disabled="inProgress">
<template v-if="progress"> <template v-if="inProgress">
{{ $t('user_card.follow_progress') }} {{ $t('user_card.follow_progress') }}
</template> </template>
<template v-else> <template v-else>
@ -27,7 +27,7 @@
</template> </template>
</button> </button>
</template> </template>
<template slot="third-area"> <template slot="tertiary-area">
<span class="faint" v-if="!noFollowsYou && user.follows_you"> <span class="faint" v-if="!noFollowsYou && user.follows_you">
{{ isMe ? $t('user_card.its_you') : $t('user_card.follows_you') }} {{ isMe ? $t('user_card.its_you') : $t('user_card.follows_you') }}
</span> </span>

View file

@ -1,6 +1,6 @@
<template> <template>
<basic-user-card :user="user"> <basic-user-card :user="user">
<template slot="third-area"> <template slot="tertiary-area">
<div class="follow-request-card-action-buttons-container"> <div class="follow-request-card-action-buttons-container">
<button class="btn btn-default" @click="approveUser">{{ $t('user_card.approve') }}</button> <button class="btn btn-default" @click="approveUser">{{ $t('user_card.approve') }}</button>
<button class="btn btn-default" @click="denyUser">{{ $t('user_card.deny') }}</button> <button class="btn btn-default" @click="denyUser">{{ $t('user_card.deny') }}</button>