aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat_panel/chat_panel.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/chat_panel/chat_panel.js')
-rw-r--r--src/components/chat_panel/chat_panel.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/components/chat_panel/chat_panel.js b/src/components/chat_panel/chat_panel.js
new file mode 100644
index 00000000..b146c5d9
--- /dev/null
+++ b/src/components/chat_panel/chat_panel.js
@@ -0,0 +1,21 @@
+const chatPanel = {
+ 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 chatPanel