Player name, pwa & branding
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { ToastProgrammatic as Toast } from 'buefy'
|
||||
|
||||
const connection = new WebSocket('ws://localhost:8181/socket')
|
||||
// const connection = new WebSocket('wss://tronio.gltronic.ovh/socket')
|
||||
|
||||
@@ -14,7 +16,11 @@ export default function createSocketPlugin () {
|
||||
|
||||
connection.onerror = function (error) {
|
||||
console.log('[WS] error ' + error.message)
|
||||
store.dispatch('game/error', 'Connection problem')
|
||||
// store.dispatch('game/error', 'Connection problem')
|
||||
Toast.open('Connection problem. Retrying in 10s...')
|
||||
setTimeout(function () {
|
||||
location.reload()
|
||||
}, 10000)
|
||||
}
|
||||
|
||||
connection.onmessage = function (message) {
|
||||
|
||||
Reference in New Issue
Block a user