<template lang="pug">
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")
+ @keyup.enter="sendChat()")
+ button(@click="sendChat()") {{ st.tr["Send"] }}
+ p(v-for="chat in chats.concat(pastChats)")
+ span.name {{ chat.name }} :
+ span(:class="classObject(chat)" v-html="chat.msg")
</template>
<script>
import { store } from "@/store";
-
export default {
name: "my-chat",
// Prop 'pastChats' for corr games where chats are on server
</script>
<style lang="sass" scoped>
+.name
+ color: #abb2b9
.my-chatmsg
- color: grey
+ color: #7d3c98
.opp-chatmsg
- color: black
+ color: #2471a3
</style>