Use dedicated indicator for non-ascii domain names
This commit is contained in:
parent
e812d5ea3c
commit
0a79a74773
22 changed files with 151 additions and 49 deletions
38
src/components/user_link/user_link.vue
Normal file
38
src/components/user_link/user_link.vue
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<template>
|
||||
<router-link
|
||||
:title="user.screen_name_ui"
|
||||
:to="userProfileLink(user)"
|
||||
>
|
||||
{{ at ? '@' : '' }}{{ user.screen_name_ui }}<UnicodeDomainIndicator
|
||||
:user="user"
|
||||
/>
|
||||
</router-link>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import UnicodeDomainIndicator from '../unicode_domain_indicator/unicode_domain_indicator.vue'
|
||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||
|
||||
const UserLink = {
|
||||
props: {
|
||||
user: Object,
|
||||
at: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
components: {
|
||||
UnicodeDomainIndicator
|
||||
},
|
||||
methods: {
|
||||
userProfileLink (user) {
|
||||
return generateProfileLink(
|
||||
user.id, user.screen_name,
|
||||
this.$store.state.instance.restrictedNicknames
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default UserLink
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue