chrome fix

This commit is contained in:
ntr 2019-05-15 18:57:31 +10:00
parent ef1c1f2c61
commit 6c4674d00b
4 changed files with 14 additions and 12 deletions

View File

@ -9,7 +9,6 @@ const actions = require('./actions');
const setupKeys = require('./keyboard');
const createSocket = require('./socket');
const registerEvents = require('./events');
const testGame = require('./test.game');
const Header = require('./components/header.container');
const Body = require('./components/body.component');
@ -51,18 +50,15 @@ document.fonts.load('16pt "Jura"').then(() => {
store.dispatch(actions.setWs(ws));
ws.connect();
events.setGame(testGame);
ws.clearGameStateTimeout();
const Cryps = () => (
<main className="cryps" >
<Header />
<nav>
<h2>Team</h2>
<button>zzz</button>
<button>muji</button>
<button>kaast</button>
<h2>Instances</h2>
<button>
join new
</button>
<hr />
<button>
six
</button>

View File

@ -1,6 +1,7 @@
const toast = require('izitoast');
const cbor = require('borc');
const testGame = require('./test.game');
const SOCKET_URL = process.env.NODE_ENV === 'production' ? 'wss://cryps.gg/ws' : 'ws://localhost:40000';
@ -310,6 +311,9 @@ function createSocket(events) {
events.setAccount(account);
sendAccountInstances();
sendAccountCryps();
console.log(testGame);
events.setGame(testGame(account.id));
clearGameStateTimeout();
}
sendPing();

View File

@ -1,4 +1,5 @@
const game = {
function testGame(uuid) {
return {
"id": "667ad344-dc76-40b9-bb9c-0d20f0f7f5d2",
"player_cryps": 3,
"player_num": 2,
@ -257,7 +258,7 @@ const game = {
"warnings": 0
},
{
"id": "ec936c53-8eab-44e7-953f-9739531cee24",
"id": uuid,
"name": "ntr",
"vbox": {
"bits": 18,
@ -602,6 +603,7 @@ const game = {
],
"instance": "5dcd5f1f-276d-41af-9a11-83e8912bad45",
"phase_end": "2019-05-03T06:52:26.494331765Z"
};
}
module.exports = game;
module.exports = testGame;

View File

@ -159,10 +159,10 @@ button.action {
svg {
flex: 1;
fill: none;
stroke: whitesmoke;
stroke-width: 0;
height: 2em;
}
img {