diff options
| author | Roger Braun <roger@rogerbraun.net> | 2018-01-26 15:11:34 +0100 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2018-01-26 15:11:34 +0100 |
| commit | 92289e545a62bd28ea336c5d712a05445e0e20ab (patch) | |
| tree | eec01172230ef116c25f4f68c104da568c484820 /src/components/chat_panel/chat_panel.js | |
| parent | 1c067f8562a873247f8d856f61d8f1437876c077 (diff) | |
Move chat to sidebar.
Diffstat (limited to 'src/components/chat_panel/chat_panel.js')
| -rw-r--r-- | src/components/chat_panel/chat_panel.js | 21 |
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 |
