akkoma-fe/src/components/chat_title/chat_title.js

21 lines
392 B
JavaScript
Raw Normal View History

2020-05-07 13:10:53 +00:00
import Vue from 'vue'
import ChatAvatar from '../chat_avatar/chat_avatar.vue'
export default Vue.component('chat-title', {
name: 'ChatTitle',
components: {
ChatAvatar
},
props: [
'user', 'withAvatar'
],
computed: {
title () {
return this.user ? this.user.screen_name : ''
},
htmlTitle () {
return this.user ? this.user.name_html : ''
}
}
})