aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/chat')
-rw-r--r--src/components/chat/chat.js21
-rw-r--r--src/components/chat/chat.vue59
2 files changed, 0 insertions, 80 deletions
diff --git a/src/components/chat/chat.js b/src/components/chat/chat.js
deleted file mode 100644
index ef326d4a..00000000
--- a/src/components/chat/chat.js
+++ /dev/null
@@ -1,21 +0,0 @@
-const chat = {
- data () {
- return {
- currentMessage: '',
- channel: null
- }
- },
- computed: {
- messages () {
- return this.$store.state.chat.messages
- }
- },
- methods: {
- submit (message) {
- this.$store.state.chat.channel.push('new_msg', {text: message}, 10000)
- this.currentMessage = ''
- }
- }
-}
-
-export default chat
diff --git a/src/components/chat/chat.vue b/src/components/chat/chat.vue
deleted file mode 100644
index 6c1e2c38..00000000
--- a/src/components/chat/chat.vue
+++ /dev/null
@@ -1,59 +0,0 @@
-<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>