Use dedicated indicator for non-ascii domain names Closes #1189 See merge request pleroma/pleroma-fe!1632remove-mods-files
commit
3b6c31f3b3
@ -0,0 +1,26 @@
|
|||||||
|
<template>
|
||||||
|
<FAIcon
|
||||||
|
v-if="user && user.screen_name_ui_contains_non_ascii"
|
||||||
|
icon="code"
|
||||||
|
:title="$t('unicode_domain_indicator.tooltip')"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
|
import {
|
||||||
|
faCode
|
||||||
|
} from '@fortawesome/free-solid-svg-icons'
|
||||||
|
|
||||||
|
library.add(
|
||||||
|
faCode
|
||||||
|
)
|
||||||
|
|
||||||
|
const UnicodeDomainIndicator = {
|
||||||
|
props: {
|
||||||
|
user: Object
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default UnicodeDomainIndicator
|
||||||
|
</script>
|
@ -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…
Reference in new issue