aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat_title/chat_title.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/chat_title/chat_title.js')
-rw-r--r--src/components/chat_title/chat_title.js20
1 files changed, 20 insertions, 0 deletions
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 : ''
+ }
+ }
+})