diff options
| author | lambadalambda <gitgud@rogerbraun.net> | 2017-02-22 05:11:18 -0500 |
|---|---|---|
| committer | lambadalambda <gitgud@rogerbraun.net> | 2017-02-22 05:11:18 -0500 |
| commit | 935c0e09c650bca5f92d05335d158ef3c148901b (patch) | |
| tree | 57a0d5631dfa993d54a84688b278a2494ff1a775 /src/components/user_card_content/user_card_content.vue | |
| parent | 8d4d8b6b6c66ff7d3269917ca88c9698326a73f4 (diff) | |
| parent | 874f9765318897bfde0cf80c9e75da9b3b66f25d (diff) | |
Merge branch 'fix/dont_display_following_when_logged_out' into 'develop'
Hide Follow-button and 'Follows you' text when not logged in
Closes #14
See merge request !27
Diffstat (limited to 'src/components/user_card_content/user_card_content.vue')
| -rw-r--r-- | src/components/user_card_content/user_card_content.vue | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue index 59cee734..ee4384fa 100644 --- a/src/components/user_card_content/user_card_content.vue +++ b/src/components/user_card_content/user_card_content.vue @@ -7,18 +7,18 @@ <div class='user-name'>{{user.name}}</div> <div class='user-screen-name'>@{{user.screen_name}}</div> <div v-if="isOtherUser" class="user-interactions"> - <div v-if="user.follows_you" class="following base06"> + <div v-if="user.follows_you && loggedIn" class="following base06"> Follows you! </div> - <div class="follow"> + <div class="follow" v-if="loggedIn"> <span v-if="user.following"> <!--Following them!--> - <button @click="unfollowUser" class="base06 base01-background base06-border"> + <button @click="unfollowUser" class="base06 base01-background"> Unfollow </button> </span> <span v-if="!user.following"> - <button @click="followUser" class="base01 base04-background base01-border"> + <button @click="followUser" class="base01 base04-background"> Follow </button> </span> @@ -66,6 +66,9 @@ }, isOtherUser () { return this.user !== this.$store.state.users.currentUser + }, + loggedIn () { + return this.$store.state.users.currentUser } }, methods: { |
