This Vue.js chat component installed easily:
npm i --save vue-steam-chat
I was able to set it up and change the background color in the component css file to match the forums in seconds:
<template>
<div style="height: 600px; width: 300px;">
<VueSteamChat :messages="messages" @vue-steam-chat-on-message="onNewMessage"/>
</div>
</template>
<script>
import VueSteamChat from "vue-steam-chat";
// This is required for styling the component. You can also write your own stylesheet. You can find my styles inside the vue component
require("vue-steam-chat/dist/index.css");
export default {
name: "vue-steam-chat",
components: {
VueSteamChat
},
data() {
return {
messages: [
{
time: 1506117496,
username: "Gaben",
text: "I am really rich!!!"
},
{
time: 1506117500,
username: "Solo",
text: "But i am your employee"
},
{
time: 1506117530,
username: "Neo",
text: "Hmmm..."
}
]
};
},
methods: {
onNewMessage(message) {
alert(message);
}
}
};
</script>
Next, I need to decide if and where to integrate this into the forums and if I should change it to be a modal or leave it flat.
Ravinder wants me to integrate this type of commenting system into each discussion, right below the first post, so everyone, even unregistered users can comment on every discussion, which is an interested idea.
Any more suggestions or ideas?
NPM ref: vue-steam-chat - npm