Player name, pwa & branding

This commit is contained in:
Thomas
2020-09-01 12:36:43 +02:00
parent 85a8139270
commit d8ce1001cb
46 changed files with 618 additions and 42 deletions

View File

@@ -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) {