diff options
| author | eal <eal@waifu.club> | 2017-12-23 19:52:16 +0200 |
|---|---|---|
| committer | eal <eal@waifu.club> | 2017-12-23 19:52:16 +0200 |
| commit | b67c50606250d2c2d4b3750affdbab6525872f2a (patch) | |
| tree | bb45758ecab1ef87976c07d37b6936a3531e2b13 /src/components/chat/chat.js | |
| parent | 581e3e836ad6c8a9a211eb09d7eaa1fbaf830da2 (diff) | |
| parent | 6fd309452a1d8243257bc8544429ea53a26ce8a4 (diff) | |
Merge branch 'develop' into feature/normal-emoji-completion
Diffstat (limited to 'src/components/chat/chat.js')
| -rw-r--r-- | src/components/chat/chat.js | 21 |
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 |
