diff options
| author | Henry Jameson <me@hjkos.com> | 2019-08-31 22:38:02 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2019-08-31 22:38:02 +0300 |
| commit | 18ec13d796c0928d09fa93de4117822d2e35502c (patch) | |
| tree | 1cfb4d68a246c604396bb64bbba3e69bdf4fe511 /src/components/chat_panel/chat_panel.vue | |
| parent | b3e9a5a71819c7d3a4b35c5b6ad551785a7ba44f (diff) | |
| parent | 018a650166a5dce0878b696359a999ab67634cfc (diff) | |
Merge remote-tracking branch 'upstream/develop' into docs
* upstream/develop: (193 commits)
fix user avatar fallback logic
remove dead code
make bio textarea resizable vertically only
remove dead code
remove dead code
fix crazy watch logic in conversation
show three dot button only if needed
hide mute conversation button to guests
update keyBy
generate idObj at timeline level
fix pin showing logic in conversation
Show a message when JS is disabled
Initialize chat only if user is logged in and it wasn't initialized before
i18n/Update Japanese
i18n/Update pedantic Japanese
sync profile tab state with location query
refactor TabSwitcher
use better name of controlled prop
fix potential bug to render active tab in controlled way
remove unused param
...
Diffstat (limited to 'src/components/chat_panel/chat_panel.vue')
| -rw-r--r-- | src/components/chat_panel/chat_panel.vue | 59 |
1 files changed, 44 insertions, 15 deletions
diff --git a/src/components/chat_panel/chat_panel.vue b/src/components/chat_panel/chat_panel.vue index b37469ac..3677722f 100644 --- a/src/components/chat_panel/chat_panel.vue +++ b/src/components/chat_panel/chat_panel.vue @@ -1,41 +1,70 @@ <template> - <div class="chat-panel" v-if="!this.collapsed || !this.floating"> + <div + v-if="!collapsed || !floating" + class="chat-panel" + > <div class="panel panel-default"> - <div class="panel-heading timeline-heading" :class="{ 'chat-heading': floating }" @click.stop.prevent="togglePanel"> + <div + class="panel-heading timeline-heading" + :class="{ 'chat-heading': floating }" + @click.stop.prevent="togglePanel" + > <div class="title"> - <span>{{$t('chat.title')}}</span> - <i class="icon-cancel" v-if="floating"></i> + <span>{{ $t('chat.title') }}</span> + <i + v-if="floating" + class="icon-cancel" + /> </div> </div> - <div class="chat-window" v-chat-scroll> - <div class="chat-message" v-for="message in messages" :key="message.id"> + <div + v-chat-scroll + class="chat-window" + > + <div + v-for="message in messages" + :key="message.id" + class="chat-message" + > <span class="chat-avatar"> - <img :src="message.author.avatar" /> + <img :src="message.author.avatar"> </span> <div class="chat-content"> <router-link class="chat-name" - :to="userProfileLink(message.author)"> - {{message.author.username}} + :to="userProfileLink(message.author)" + > + {{ message.author.username }} </router-link> <br> <span class="chat-text"> - {{message.text}} + {{ message.text }} </span> </div> </div> </div> <div class="chat-input"> - <textarea @keyup.enter="submit(currentMessage)" v-model="currentMessage" class="chat-input-textarea" rows="1"></textarea> + <textarea + v-model="currentMessage" + class="chat-input-textarea" + rows="1" + @keyup.enter="submit(currentMessage)" + /> </div> </div> </div> - <div v-else class="chat-panel"> + <div + v-else + class="chat-panel" + > <div class="panel panel-default"> - <div class="panel-heading stub timeline-heading chat-heading" @click.stop.prevent="togglePanel"> + <div + class="panel-heading stub timeline-heading chat-heading" + @click.stop.prevent="togglePanel" + > <div class="title"> - <i class="icon-comment-empty"></i> - {{$t('chat.title')}} + <i class="icon-comment-empty" /> + {{ $t('chat.title') }} </div> </div> </div> |
