diff options
Diffstat (limited to 'src/components/user_card_content')
| -rw-r--r-- | src/components/user_card_content/user_card_content.js | 4 | ||||
| -rw-r--r-- | src/components/user_card_content/user_card_content.vue | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js index d22d4ec1..abdac58e 100644 --- a/src/components/user_card_content/user_card_content.js +++ b/src/components/user_card_content/user_card_content.js @@ -1,5 +1,6 @@ import StillImage from '../still-image/still-image.vue' import { hex2rgb } from '../../services/color_convert/color_convert.js' +import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' export default { props: [ 'user', 'switcher', 'selected', 'hideBio', 'activatePanel' ], @@ -40,6 +41,9 @@ export default { const days = Math.ceil((new Date() - new Date(this.user.created_at)) / (60 * 60 * 24 * 1000)) return Math.round(this.user.statuses_count / days) }, + userProfileLink (user) { + return generateProfileLink(user.id, user.screen_name) + }, userHighlightType: { get () { const data = this.$store.state.config.highlight[this.user.screen_name] diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue index bde1d139..6e48f3f9 100644 --- a/src/components/user_card_content/user_card_content.vue +++ b/src/components/user_card_content/user_card_content.vue @@ -9,13 +9,13 @@ <i class="icon-link-ext usersettings"></i> </a> <div class='container'> - <router-link :to="{ name: 'user-profile', params: { name: user.screen_name } }"> + <router-link :to="userProfileLink(user)"> <StillImage class="avatar" :src="user.profile_image_url_original"/> </router-link> <div class="name-and-screen-name"> <div :title="user.name" class='user-name' v-if="user.name_html" v-html="user.name_html"></div> <div :title="user.name" class='user-name' v-else>{{user.name}}</div> - <router-link class='user-screen-name' :to="{ name: 'user-profile', params: { name: user.screen_name } }"> + <router-link class='user-screen-name' :to="userProfileLink(user)"> <span>@{{user.screen_name}}</span><span v-if="user.locked"><i class="icon icon-lock"></i></span> <span v-if="!hideUserStatsLocal" class="dailyAvg">{{dailyAvg}} {{ $t('user_card.per_day') }}</span> </router-link> |
