From aa2cf51c05ebdf411d74af5debbbc8fa4d3cf457 Mon Sep 17 00:00:00 2001 From: eugenijm Date: Thu, 7 May 2020 16:10:53 +0300 Subject: Add Chats --- src/components/chat_title/chat_title.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/components/chat_title/chat_title.js (limited to 'src/components/chat_title/chat_title.js') diff --git a/src/components/chat_title/chat_title.js b/src/components/chat_title/chat_title.js new file mode 100644 index 00000000..2723d5f5 --- /dev/null +++ b/src/components/chat_title/chat_title.js @@ -0,0 +1,20 @@ +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 : '' + } + } +}) -- cgit v1.2.3-70-g09d2