aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat/chat.js
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2017-12-07 17:08:20 +0000
committereal <eal@waifu.club>2017-12-07 17:08:20 +0000
commit63d29eab3f0e399e8a3b1bbfa35f1717715ffc63 (patch)
treebc0884dff5f19fc69d0248dca141f0f5f6d5eba0 /src/components/chat/chat.js
parentbf7b5a7105e6543411d83ba126dab6b00955c98c (diff)
parentecb8acb155a77092b0661854b0ca4cf3c19ff56e (diff)
Merge branch 'feature/chat' into 'develop'
Feature/chat See merge request pleroma/pleroma-fe!182
Diffstat (limited to 'src/components/chat/chat.js')
-rw-r--r--src/components/chat/chat.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/components/chat/chat.js b/src/components/chat/chat.js
new file mode 100644
index 00000000..ef326d4a
--- /dev/null
+++ b/src/components/chat/chat.js
@@ -0,0 +1,21 @@
+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