pleroma-fe/src/components/chat_panel/chat_panel.js
2018-01-26 15:11:34 +01:00

21 lines
372 B
JavaScript

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