diff options
| author | Shpuld Shpludson <shp@cock.li> | 2019-02-28 17:53:40 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2019-02-28 17:53:40 +0000 |
| commit | 88c7c8b1140aaa719e9c9314a8ce9fd04ef3baf1 (patch) | |
| tree | fd18256839bf48bc3c4c0111aa62b8534930e7e8 /src/components/follow_card/follow_card.vue | |
| parent | dc01f90dde55e2babf58878177308c11aa965006 (diff) | |
| parent | 36460fd3849816af921efdc0b36a6f31f93976ea (diff) | |
Merge branch '398-rewrite-follow-list' into 'develop'
Split UserCard into FollowCard/FollowRequestCard and Rewrite FollowList using HOCs
Closes #398
See merge request pleroma/pleroma-fe!616
Diffstat (limited to 'src/components/follow_card/follow_card.vue')
| -rw-r--r-- | src/components/follow_card/follow_card.vue | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/components/follow_card/follow_card.vue b/src/components/follow_card/follow_card.vue new file mode 100644 index 00000000..6cb064eb --- /dev/null +++ b/src/components/follow_card/follow_card.vue @@ -0,0 +1,53 @@ +<template> + <basic-user-card :user="user"> + <div class="follow-card-content-container"> + <span class="faint" v-if="!noFollowsYou && user.follows_you"> + {{ isMe ? $t('user_card.its_you') : $t('user_card.follows_you') }} + </span> + <button + v-if="showFollow" + class="btn btn-default" + @click="followUser" + :disabled="inProgress" + :title="requestSent ? $t('user_card.follow_again') : ''" + > + <template v-if="inProgress"> + {{ $t('user_card.follow_progress') }} + </template> + <template v-else-if="requestSent"> + {{ $t('user_card.follow_sent') }} + </template> + <template v-else> + {{ $t('user_card.follow') }} + </template> + </button> + <button v-if="following" class="btn btn-default pressed" @click="unfollowUser" :disabled="inProgress"> + <template v-if="inProgress"> + {{ $t('user_card.follow_progress') }} + </template> + <template v-else> + {{ $t('user_card.follow_unfollow') }} + </template> + </button> + </div> + </basic-user-card> +</template> + +<script src="./follow_card.js"></script> + +<style lang="scss"> +.follow-card-content-container { + flex-shrink: 0; + display: flex; + flex-direction: row; + justify-content: space-between; + flex-wrap: wrap; + line-height: 1.5em; + + .btn { + margin-top: 0.5em; + margin-left: auto; + width: 10em; + } +} +</style> |
