aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2019-05-08 19:40:08 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2019-05-08 19:40:08 +0000
commitd5d7658418e6f167c7a1ac07befbaf3583b9a283 (patch)
treeb4d246159a5f2bbf27ef273e432bd5129af928ed
parent157d4e601ebd1d46c7bb66d09de5561b57c7d35a (diff)
parent31e14cd45d21880962b530de1f515bc3d4fec5ba (diff)
Merge branch '530' into 'develop'
Link interaction avatars to the user profile Closes #530 See merge request pleroma/pleroma-fe!788
-rw-r--r--src/components/avatar_list/avatar_list.js6
-rw-r--r--src/components/avatar_list/avatar_list.vue6
2 files changed, 9 insertions, 3 deletions
diff --git a/src/components/avatar_list/avatar_list.js b/src/components/avatar_list/avatar_list.js
index b9e11aaa..9b6301b2 100644
--- a/src/components/avatar_list/avatar_list.js
+++ b/src/components/avatar_list/avatar_list.js
@@ -1,4 +1,5 @@
import UserAvatar from '../user_avatar/user_avatar.vue'
+import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
const AvatarList = {
props: ['users'],
@@ -9,6 +10,11 @@ const AvatarList = {
},
components: {
UserAvatar
+ },
+ methods: {
+ userProfileLink (user) {
+ return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
+ }
}
}
diff --git a/src/components/avatar_list/avatar_list.vue b/src/components/avatar_list/avatar_list.vue
index 4e0de2c9..c0238570 100644
--- a/src/components/avatar_list/avatar_list.vue
+++ b/src/components/avatar_list/avatar_list.vue
@@ -1,8 +1,8 @@
<template>
<div class="avatars">
- <div class="avatars-item" v-for="user in slicedUsers">
- <UserAvatar :user="user" class="avatar-small" />
- </div>
+ <router-link :to="userProfileLink(user)" class="avatars-item" v-for="user in slicedUsers">
+ <UserAvatar :user="user" class="avatar-small" />
+ </router-link>
</div>
</template>