The console component is diplayed on bottom of the game, it allows to log little messages to the user, withot opening the browser console. Like syntax errors when the user starts his script.
The console component is binded to the console messages store, so when a new message is commited to the global store of the app, the console component will automaticaly update the dom to show the message.
Like all other store updates, you must use the mutations to commit new messages to the store. To easily create log/errors/success messages, a few actions are available on the store to direcly commit the type of message you want.
Examples :
// Add a success message in a vue component (anywhere in the app)
this.$store.dispatch('console/success', 'A success message !!!')
// Add a warning message from a store action
myAction ({ dispatch }) => {
dispatch('console/warning', 'My warning message')
}
console/log
: whiteconsole/info
: blueconsole/success
: greenconsole/warning
: yellowconsole/error
: red