2020-06-21 14:13:29 +00:00
|
|
|
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
|
|
|
import UserAvatar from '../user_avatar/user_avatar.vue'
|
2020-05-07 13:10:53 +00:00
|
|
|
|
2021-04-25 09:46:13 +00:00
|
|
|
export default {
|
2020-05-07 13:10:53 +00:00
|
|
|
name: 'ChatTitle',
|
|
|
|
components: {
|
2020-06-21 14:13:29 +00:00
|
|
|
UserAvatar
|
2020-05-07 13:10:53 +00:00
|
|
|
},
|
|
|
|
props: [
|
|
|
|
'user', 'withAvatar'
|
|
|
|
],
|
|
|
|
computed: {
|
|
|
|
title () {
|
2021-02-26 14:23:11 +00:00
|
|
|
return this.user ? this.user.screen_name_ui : ''
|
2020-05-07 13:10:53 +00:00
|
|
|
},
|
|
|
|
htmlTitle () {
|
|
|
|
return this.user ? this.user.name_html : ''
|
|
|
|
}
|
2020-06-21 14:13:29 +00:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
getUserProfileLink (user) {
|
|
|
|
return generateProfileLink(user.id, user.screen_name)
|
|
|
|
}
|
2020-05-07 13:10:53 +00:00
|
|
|
}
|
2021-04-25 09:46:13 +00:00
|
|
|
}
|