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 (901B)


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