aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorValD <maghtpol@gmail.com>2018-12-13 23:11:36 +0530
committerValD <maghtpol@gmail.com>2018-12-13 23:20:59 +0530
commite2f825266a967029ef163ecc8cfb8e5d26a5e635 (patch)
treea1d58a75aa648a706872df29f3e5d09467776144 /src
parentad56c8e5bd3f62829b7ccfac285a10425dcbb57a (diff)
added condition to check for logined user
Diffstat (limited to 'src')
-rw-r--r--src/components/user_card/user_card.js3
-rw-r--r--src/components/user_card/user_card.vue4
-rw-r--r--src/i18n/en.json1
3 files changed, 6 insertions, 2 deletions
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js
index a019627a..b8eb28e3 100644
--- a/src/components/user_card/user_card.js
+++ b/src/components/user_card/user_card.js
@@ -14,6 +14,9 @@ const UserCard = {
components: {
UserCardContent
},
+ computed: {
+ currentUser () { return this.$store.state.users.currentUser }
+ },
methods: {
toggleUserExpanded () {
this.userExpanded = !this.userExpanded
diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue
index 5a8e5531..eb0d7576 100644
--- a/src/components/user_card/user_card.vue
+++ b/src/components/user_card/user_card.vue
@@ -10,13 +10,13 @@
<div :title="user.name" v-if="user.name_html" class="user-name">
<span v-html="user.name_html"></span>
<span class="follows-you" v-if="!userExpanded && showFollows && user.follows_you">
- {{ $t('user_card.follows_you') }}
+ {{ currentUser.id == user.id ? $t('user_card.its_you') : $t('user_card.follows_you') }}
</span>
</div>
<div :title="user.name" v-else class="user-name">
{{ user.name }}
<span class="follows-you" v-if="!userExpanded && showFollows && user.follows_you">
- {{ $t('user_card.follows_you') }}
+ {{ currentUser.id == user.id ? $t('user_card.its_you') : $t('user_card.follows_you') }}
</span>
</div>
<router-link class='user-screen-name' :to="{ name: 'user-profile', params: { id: user.id } }">
diff --git a/src/i18n/en.json b/src/i18n/en.json
index 9101c993..1c43794a 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -324,6 +324,7 @@
"followers": "Followers",
"following": "Following!",
"follows_you": "Follows you!",
+ "its_you": "It's you!",
"mute": "Mute",
"muted": "Muted",
"per_day": "per day",