logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/

user_link.vue (809B)


  1. <template>
  2. <router-link
  3. :title="user.screen_name_ui"
  4. :to="userProfileLink(user)"
  5. >
  6. {{ at ? '@' : '' }}{{ user.screen_name_ui }}<UnicodeDomainIndicator
  7. :user="user"
  8. />
  9. </router-link>
  10. </template>
  11. <script>
  12. import UnicodeDomainIndicator from '../unicode_domain_indicator/unicode_domain_indicator.vue'
  13. import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
  14. const UserLink = {
  15. props: {
  16. user: Object,
  17. at: {
  18. type: Boolean,
  19. default: true
  20. }
  21. },
  22. components: {
  23. UnicodeDomainIndicator
  24. },
  25. methods: {
  26. userProfileLink (user) {
  27. return generateProfileLink(
  28. user.id, user.screen_name,
  29. this.$store.state.instance.restrictedNicknames
  30. )
  31. }
  32. }
  33. }
  34. export default UserLink
  35. </script>