diff options
author | Dashie <dashie@sigpipe.me> | 2020-04-08 13:33:19 +0200 |
---|---|---|
committer | Dashie <dashie@sigpipe.me> | 2020-04-08 13:33:19 +0200 |
commit | 152f82049adfa03ee4e00f30a55a199757818f44 (patch) | |
tree | c6a033d126058231dd2ca5f343d3c59daa837734 | |
parent | cf5a75903eeb163740622ec723ec7f0a0192f1a4 (diff) |
Fix remote link logic used in following/ers card
-rw-r--r-- | front/src/components/user_card_list/user_card_list.vue | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/front/src/components/user_card_list/user_card_list.vue b/front/src/components/user_card_list/user_card_list.vue index ec00e25f..328b8e2b 100644 --- a/front/src/components/user_card_list/user_card_list.vue +++ b/front/src/components/user_card_list/user_card_list.vue @@ -7,12 +7,12 @@ </div> <div class="align-self-center"> <h2 class="h2 m-0"> - <b-link :to="{ name: 'user-profile', params: { name: user.screen_name } }" class="text-decoration-none text-body"> + <b-link :to="userProfileLink(user)" class="text-decoration-none text-body"> {{ user.name }} </b-link> </h2> <p class="h3 font-weight-normal m-0"> - <b-link :to="{ name: 'user-profile', params: { name: user.screen_name } }" class="text-decoration-none text-body"> + <b-link :to="userProfileLink(user)" class="text-decoration-none text-body"> @{{ user.screen_name }} </b-link> </p> @@ -113,6 +113,8 @@ <script> import { requestFollow, requestUnfollow } from '../../services/follow_manipulate/follow_manipulate.js' +import generateRemoteLink from 'src/services/remote_user_link_generator/remote_user_link_generator.js' + const UserCardList = { props: [ 'user' @@ -151,6 +153,13 @@ const UserCardList = { requestUnfollow(this.user, store).then(() => { this.followRequestInProgress = false }) + }, + userProfileLink (user) { + return generateRemoteLink( + user.flakeId, user.screen_name, + this.$store.state.instance.restrictedNicknames, + 'user-profile' + ) } } } |