aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat/chat.vue
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2017-12-23 19:52:16 +0200
committereal <eal@waifu.club>2017-12-23 19:52:16 +0200
commitb67c50606250d2c2d4b3750affdbab6525872f2a (patch)
treebb45758ecab1ef87976c07d37b6936a3531e2b13 /src/components/chat/chat.vue
parent581e3e836ad6c8a9a211eb09d7eaa1fbaf830da2 (diff)
parent6fd309452a1d8243257bc8544429ea53a26ce8a4 (diff)
Merge branch 'develop' into feature/normal-emoji-completion
Diffstat (limited to 'src/components/chat/chat.vue')
-rw-r--r--src/components/chat/chat.vue59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/components/chat/chat.vue b/src/components/chat/chat.vue
new file mode 100644
index 00000000..6c1e2c38
--- /dev/null
+++ b/src/components/chat/chat.vue
@@ -0,0 +1,59 @@
+<template>
+ <div class="chat-panel panel panel-default">
+ <div class="panel-heading timeline-heading base02-background base04">
+ <div class="title">
+ {{$t('chat.title')}}
+ </div>
+ </div>
+ <div class="panel-body base01-background">
+ <div class="chat-window">
+ <div class="chat-message" v-for="message in messages" :key="message.id">
+ <span class="chat-avatar">
+ <img :src="message.author.avatar" />
+ {{message.author.username}}:
+ </span>
+ <span class="chat-text">
+ {{message.text}}
+ </span>
+ </div>
+ </div>
+ <div class="chat-input">
+ <form @submit.prevent="submit(currentMessage)">
+ <input v-model="currentMessage" type="text" >
+ </form>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script src="./chat.js"></script>
+
+
+<style lang="scss">
+ .chat-window {
+ max-height: 80vh;
+ overflow-y: auto;
+ overflow-x: hidden;
+ }
+ .chat-message {
+ padding: 0.2em 0.5em
+ }
+ .chat-avatar {
+ img {
+ height: 32px;
+ width: 32px;
+ border-radius: 5px;
+ margin-right: 0.5em;
+ }
+ }
+ .chat-input {
+ display: flex;
+ form {
+ flex: auto;
+ input {
+ margin: 0.5em;
+ width: fill-available;
+ }
+ }
+ }
+</style>