X-Git-Url: https://git.auder.net/doc/index.css?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FChat.vue;h=bce0ba0df5b52491ee7972cc323c3c2a94dc2330;hb=b70a32d4e9a6446164e06ba07a586bb157aaf928;hp=d8513b31126958be50bdbb6587bc333453b16a12;hpb=bfe9a1357f43c2a2cc271e0f244f4785363d7961;p=vchess.git
diff --git a/client/src/components/Chat.vue b/client/src/components/Chat.vue
index d8513b31..bce0ba0d 100644
--- a/client/src/components/Chat.vue
+++ b/client/src/components/Chat.vue
@@ -1,71 +1,93 @@
div
- input#inputChat(type="text" :placeholder="st.tr['Type here']"
- @keyup.enter="sendChat")
- button#sendChatBtn(@click="sendChat") {{ st.tr["Send"] }}
- p(v-for="chat in chats" :class="classObject(chat)"
- v-html="chat.name + ': ' + chat.msg")
- p(v-for="chat in pastChats" :class="classObject(chat)"
- v-html="chat.name + ': ' + chat.msg")
+ button(@click="clearHistory()")
+ | {{ st.tr["Clear history"] }}
+ input#inputChat(
+ type="text"
+ :placeholder="st.tr['Chat here']"
+ @keyup.enter="sendChat()"
+ )
+ button(@click="sendChat()") {{ st.tr["Send"] }}
+ p(v-for="chat in chats.concat(pastChats)")
+ span.name {{ chat.name || "@nonymous" }} :
+ span(
+ :class="classObject(chat)"
+ v-html="chat.msg"
+ )