X-Git-Url: https://git.auder.net/pieces/Checkered/cq.svg?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FChat.vue;h=25898cecf7bc16f6cc20f77054fc451c08abaf5f;hb=5246b49d18b711fb26ee27919ab392be24b80fba;hp=7eeba5ac77b6ea22e29bc58d5d1e1df0a50634d8;hpb=ac8f441c6441d827b43aabeb812cb4c79e9ee96b;p=vchess.git
diff --git a/client/src/components/Chat.vue b/client/src/components/Chat.vue
index 7eeba5ac..25898cec 100644
--- a/client/src/components/Chat.vue
+++ b/client/src/components/Chat.vue
@@ -1,58 +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"
+ )