From 7b1a6df40b1fd1b20cae8a7f6dfc4bf66390ddcb Mon Sep 17 00:00:00 2001 From: Mashy Date: Mon, 4 Nov 2019 10:27:22 +1000 Subject: [PATCH 1/7] landscape is the way --- client/assets/styles/game.less | 101 +--------------- client/assets/styles/instance.mobile.less | 141 +--------------------- client/assets/styles/menu.less | 26 ---- client/assets/styles/styles.mobile.less | 122 +------------------ 4 files changed, 3 insertions(+), 387 deletions(-) diff --git a/client/assets/styles/game.less b/client/assets/styles/game.less index fe5dd570..ce49b4b1 100644 --- a/client/assets/styles/game.less +++ b/client/assets/styles/game.less @@ -347,103 +347,4 @@ max-height: 100%; max-width: 100%; // height: 5em; -} - -@media (max-width: 1000px) { - .game { - grid-template-areas: - "opponent" - "target " - "player "; - - grid-template-rows: 1fr 0.2fr 1.5fr; - grid-template-columns: 1fr; - - .game-construct { - display: grid; - grid-template-columns: 1fr; - grid-template-rows: min-content 1fr; - - .left { - width: 100%; - grid-template-areas: - "skills" - "effects"; - grid-template-columns: 1fr; - grid-template-rows: min-content min-content; - } - - .skills { - button { - padding: 0 0.5em ; - margin: 0; - } - button.active { - background: #2c2c2c; - } - } - - .stats div { - padding: 0; - } - - .stats .max { - display: none; - } - - .stats .value { - display: flex; - } - - .stats svg { - height: 1em; - } - - .stats div { - margin: 0 0.2em; - } - - .effects { - font-size: 100%; - } - - .stats, .name { - font-size: 75%; - } - - .skills button { - font-size: 50%; - } - - .skill-description { - font-size: 65%; - } - } - - .player { - width: calc(100% - 1em); - bottom: 3em; - height: calc(50% - 3em); - } - - .opponent { - width: calc(100% - 1em); - .game-construct { - display: grid; - grid-template-columns: 1fr; - grid-template-rows: min-content 1fr; - } - } - - #targeting, .resolving-skill { - width: calc(100% - 1em); - } - - .player { - width: calc(100% - 1em); - bottom: 3em; - height: calc(50% - 3em); - } - } - -} +} \ No newline at end of file diff --git a/client/assets/styles/instance.mobile.less b/client/assets/styles/instance.mobile.less index 9fec777b..925b487f 100644 --- a/client/assets/styles/instance.mobile.less +++ b/client/assets/styles/instance.mobile.less @@ -17,9 +17,7 @@ @media (max-width: 800px) { .instance { - overflow-y: scroll; - font-size: 8pt; - display: grid; + font-size: 6pt; grid-template-columns: 1fr; grid-template-rows: min-content 1fr; grid-template-areas: @@ -30,141 +28,4 @@ display: none; } } - - .instance .nav-btn { display: initial; } - - .vbox { - grid-area: vbox; - margin-bottom: 0; - display: grid; - grid-template-rows: min-content min-content min-content min-content; - grid-template-columns: 1fr; - grid-template-areas: - "vbox" - "varrow" - "inventory" - "combiner"; - - &:not(.visible) { - display: none; - } - - .vbox-vbox { - margin-bottom: 1em; - } - } - - .vbox-arrow { - display: none; - } - - .vbox-inventory .vbox-hdr { - display: block; - } - - .vbox-arrow-mobile { - display: block; - grid-area: varrow; - width: 100%; - text-align: center; - margin: 0; - } - - .construct-list { - display: grid; - grid-auto-rows: 1fr; - - .instance-construct:not(.visible) { - display: none; - }; - } - - .vbox-inventory { - margin-left: 0; - } - - .vbox-combiner { - margin-left: 0; - } - - .equip .specs { - margin-top: 0.5em; - border: none; - border-bottom: 1px solid #444; - } - - .equip .skills { - border: none; - border-bottom: 1px solid #444; - } - - .instance-construct { - display: grid; - grid-template-rows: min-content min-content min-content 1fr min-content; - grid-template-areas: - "name " - "skills " - "specs " - "avatar " - "stats "; - - border: 0; - padding: 0; - - transition-property: all; - transition-duration: 0.25s; - transition-delay: 0; - transition-timing-function: ease; - } - - .instance-construct:first-child { - border-left-width: 0; - } - - .instance-construct:not(:last-child) { - border-right: 1px solid #222; - } - - .instance-construct .skills { - flex-flow: column; - } - - .instance-construct .skills button { - margin: 0; - } - - .instance-construct .specs { - margin: 0; - } - - .construct-list .stats { - flex-flow: row wrap; - text-align: center; - } - - .instance-construct .stats div.speed { - order: -1; - flex: 1 0 100%; - margin: 0; - } - - .instance-construct .stats div { - flex: 1 1 33%; - } - - .instance-nav { - display: flex; - grid-area: nav; - margin-right: 0; - border-top: 2px solid #444; - } - - .instance-nav button { - font-size: 150%; - border-right: 2px solid #444; - } - - .instance-nav button:last-child { - border: none; - } } \ No newline at end of file diff --git a/client/assets/styles/menu.less b/client/assets/styles/menu.less index 672e928e..5445b158 100644 --- a/client/assets/styles/menu.less +++ b/client/assets/styles/menu.less @@ -215,29 +215,3 @@ section { } } -@media (max-width: 800px) { - section { - grid-template-columns: 1fr; - - .list { - grid-template-columns: 1fr 1fr; - - &.play { - grid-template-columns: 1fr; - } - } - - } - - .menu .team { - grid-template-columns: 1fr; - - .construct { - height: 10em; - } - } - - .account { - grid-template-columns: 1fr; - } -} \ No newline at end of file diff --git a/client/assets/styles/styles.mobile.less b/client/assets/styles/styles.mobile.less index be259075..0eb2a954 100644 --- a/client/assets/styles/styles.mobile.less +++ b/client/assets/styles/styles.mobile.less @@ -4,127 +4,7 @@ } #mnml { - font-size: 12pt; - padding: 0; - grid-template-columns: 1fr; - grid-template-rows: 10fr 1fr; - grid-template-areas: - "main" - "footer"; - - height: 100vh; - max-height: initial; - min-height: initial; + font-size: 6pt; } - table td { - height: 2.5em; - } - - nav { - display: none; - } - - aside { - display: none; - } - - footer { - display: flex; - position: fixed; - bottom: 0; - width: 100%; - - button { - font-size: 90%; - } - } - - #nav-btn, #instance-nav { - display: unset; - } - - #mnml.nav-visible nav { - padding: 0.5em; - margin: 0; - display: block; - grid-area: main; - } - - #mnml.nav-visible main { - display: none; - } - - main { - overflow-x: hidden; - overflow-y: initial; - max-height: 100vh; - padding: 0 0.5em; - } - - .welcome .login { - width: 100%; - } - - .welcome .options { - width: 100%; - flex-flow: row wrap; - } - - .welcome .options button { - flex: 1 0 50%; - } - - .timer-container { - margin: 0.5em 0 0 0; - } - - .mobile-title { - display: block; - margin-bottom: 1em; - } - - .menu-instances { - display: grid; - - grid-template-columns: 1fr; - grid-template-areas: - "constructs" - "inventory" - "games"; - } - - .menu { - .options { - display: grid; - grid-template-columns: 1fr; - - button:not(:last-child) { - border: 2px solid #222; - } - - button.logo { - border: none; - margin-right: 0; - margin-top: 0.5em; - background-position: center; - } - } - } - - section { - .list { - grid-template-columns: 1fr; - } - } - - .account { - div { - padding: 0; - } - } - - .play-p { - display: none; - } } From 4fa13c20c29dbca73b63427d5cc262cdbbc010c9 Mon Sep 17 00:00:00 2001 From: Mashy Date: Mon, 4 Nov 2019 13:25:23 +1000 Subject: [PATCH 2/7] misc --- client/assets/styles/styles.mobile.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/assets/styles/styles.mobile.less b/client/assets/styles/styles.mobile.less index 0eb2a954..218d90df 100644 --- a/client/assets/styles/styles.mobile.less +++ b/client/assets/styles/styles.mobile.less @@ -4,7 +4,7 @@ } #mnml { - font-size: 6pt; + font-size: 8pt; } } From 9144033f1dd5a089cb49a9abb74c4e8b63f6526e Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 4 Nov 2019 22:38:07 +1100 Subject: [PATCH 3/7] lint --- server/src/rpc.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/rpc.rs b/server/src/rpc.rs index 29d89d34..ffd340ec 100644 --- a/server/src/rpc.rs +++ b/server/src/rpc.rs @@ -1,6 +1,5 @@ use std::time::{Instant}; -use std::thread::{spawn, sleep}; -use std::time; +use std::thread::{spawn}; use std::str; From a13f67a573d708d933248304506919b86146b00a Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 5 Nov 2019 11:22:34 +1100 Subject: [PATCH 4/7] wip --- client/assets/styles/game.less | 14 ++---- client/assets/styles/instance.less | 4 +- client/assets/styles/styles.mobile.less | 47 ++++++++++++++++++++- client/src/components/anims/siphon.tick.jsx | 2 +- 4 files changed, 53 insertions(+), 14 deletions(-) diff --git a/client/assets/styles/game.less b/client/assets/styles/game.less index ce49b4b1..7391265c 100644 --- a/client/assets/styles/game.less +++ b/client/assets/styles/game.less @@ -199,7 +199,7 @@ position: absolute; top: 35%; height: 15%; - width: 90%; + width: calc(90% - 1.25em); } .resolving-skill { @@ -239,6 +239,9 @@ overflow: hidden; max-height: 100%; max-width: 100%; + + display: flex; + flex-flow: column; } .combat-anim svg { @@ -339,12 +342,3 @@ .animating .skills { opacity: 0; } - -.skill-animation { - opacity: 0; - stroke-width: 5px; - overflow: hidden; - max-height: 100%; - max-width: 100%; - // height: 5em; -} \ No newline at end of file diff --git a/client/assets/styles/instance.less b/client/assets/styles/instance.less index 0f05fc8b..cf1e43a0 100644 --- a/client/assets/styles/instance.less +++ b/client/assets/styles/instance.less @@ -225,7 +225,7 @@ } figcaption { - font-size: 75%; + // font-size: 75%; line-height: initial; } } @@ -239,7 +239,7 @@ text-align: center; figcaption { - font-size: 75%; + // font-size: 75%; } // give speed some space diff --git a/client/assets/styles/styles.mobile.less b/client/assets/styles/styles.mobile.less index 218d90df..30a03a5e 100644 --- a/client/assets/styles/styles.mobile.less +++ b/client/assets/styles/styles.mobile.less @@ -5,6 +5,51 @@ #mnml { font-size: 8pt; - } + padding: 0.25em; + .game { + + .team, #targeting, .resolving-skill { + width: calc(90% - 3em); + } + + .game-construct { + .avatar { + grid-area: initial; + position: absolute; + top: 0; + height: 100%; + width: 100%; + z-index: -1; + } + + svg { + height: 1em; + } + } + } + + .instance-construct { + position: relative; + + .skills, .specs { + font-size: 75%; + } + + .avatar { + grid-area: initial; + position: absolute; + top: 0; + height: 100%; + width: 100%; + z-index: -1; + } + } + + .opponent { + .avatar { + bottom: 0; + } + } + } } diff --git a/client/src/components/anims/siphon.tick.jsx b/client/src/components/anims/siphon.tick.jsx index 43155c07..1f7f4d47 100644 --- a/client/src/components/anims/siphon.tick.jsx +++ b/client/src/components/anims/siphon.tick.jsx @@ -38,7 +38,7 @@ class SiphonTick extends Component { render() { return ( Date: Tue, 5 Nov 2019 11:30:45 +1100 Subject: [PATCH 5/7] fix stuff that got broken --- client/assets/styles/game.less | 8 ++++++++ client/assets/styles/styles.mobile.less | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/client/assets/styles/game.less b/client/assets/styles/game.less index 7391265c..f0eb98ec 100644 --- a/client/assets/styles/game.less +++ b/client/assets/styles/game.less @@ -342,3 +342,11 @@ .animating .skills { opacity: 0; } + +.skill-animation { + opacity: 0; + stroke-width: 5px; + overflow: hidden; + max-height: 100%; + max-width: 100%; +} diff --git a/client/assets/styles/styles.mobile.less b/client/assets/styles/styles.mobile.less index 30a03a5e..558eb8dc 100644 --- a/client/assets/styles/styles.mobile.less +++ b/client/assets/styles/styles.mobile.less @@ -7,6 +7,16 @@ font-size: 8pt; padding: 0.25em; + .menu { + .logo { + display: none; + } + + .team { + height: 20em; + } + } + .game { .team, #targeting, .resolving-skill { From 51bd39dc3d420fa792b8da5df884384b3e7f6a7f Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 5 Nov 2019 11:38:26 +1100 Subject: [PATCH 6/7] vbox stroke width --- client/assets/styles/styles.mobile.less | 6 ++++++ client/assets/styles/vbox.less | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/client/assets/styles/styles.mobile.less b/client/assets/styles/styles.mobile.less index 558eb8dc..fb57f694 100644 --- a/client/assets/styles/styles.mobile.less +++ b/client/assets/styles/styles.mobile.less @@ -17,6 +17,12 @@ } } + .instance { + svg { + stroke-width: 1.25em; + } + } + .game { .team, #targeting, .resolving-skill { diff --git a/client/assets/styles/vbox.less b/client/assets/styles/vbox.less index fe62f0a2..a7545fff 100644 --- a/client/assets/styles/vbox.less +++ b/client/assets/styles/vbox.less @@ -100,7 +100,7 @@ figure { svg { height: 2em; - stroke-width: 8px; + stroke-width: 0.5em; } figcaption { From ce967109fbb339dada54235cc2b146b576d210c7 Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 5 Nov 2019 12:24:41 +1100 Subject: [PATCH 7/7] remove old hammer and swiping code --- client/assets/styles/styles.mobile.less | 2 +- client/src/actions.jsx | 2 - client/src/components/demo.jsx | 4 +- client/src/components/instance.component.jsx | 95 +++++-------------- client/src/components/instance.constructs.jsx | 11 +-- client/src/components/mnml.jsx | 23 ++--- client/src/components/vbox.component.jsx | 6 +- client/src/reducers.jsx | 2 - client/src/tutorial.utils.jsx | 5 +- 9 files changed, 39 insertions(+), 111 deletions(-) diff --git a/client/assets/styles/styles.mobile.less b/client/assets/styles/styles.mobile.less index fb57f694..14b4a3d5 100644 --- a/client/assets/styles/styles.mobile.less +++ b/client/assets/styles/styles.mobile.less @@ -1,4 +1,4 @@ -@media (max-width: 800px) { +@media (max-width: 1000px) { body { overflow-y: initial; } diff --git a/client/src/actions.jsx b/client/src/actions.jsx index 4b9d11ac..e42d349c 100644 --- a/client/src/actions.jsx +++ b/client/src/actions.jsx @@ -36,12 +36,10 @@ export const setItemInfo = value => ({ type: 'SET_ITEM_INFO', value }); export const setItemUnequip = value => ({ type: 'SET_ITEM_UNEQUIP', value }); export const setMtxActive = value => ({ type: 'SET_MTX_ACTIVE', value }); export const setNav = value => ({ type: 'SET_NAV', value }); -export const setNavInstance = value => ({ type: 'SET_NAV_INSTANCE', value }); export const setPing = value => ({ type: 'SET_PING', value }); export const setPlayer = value => ({ type: 'SET_PLAYER', value }); export const setReclaiming = value => ({ type: 'SET_RECLAIMING', value }); export const setShowLog = value => ({ type: 'SET_SHOW_LOG', value }); -export const setShowNav = value => ({ type: 'SET_SHOW_NAV', value }); export const setSkip = value => ({ type: 'SET_SKIP', value }); export const setShop = value => ({ type: 'SET_SHOP', value }); export const setSubscription = value => ({ type: 'SET_SUBSCRIPTION', value }); diff --git a/client/src/components/demo.jsx b/client/src/components/demo.jsx index 45dcf71d..494015ef 100644 --- a/client/src/components/demo.jsx +++ b/client/src/components/demo.jsx @@ -84,7 +84,7 @@ function Demo(args) { function inventoryElement() { return ( -
+

VBOX PHASE {shapes.Red()} {shapes.Green()} {shapes.Blue()} @@ -117,7 +117,7 @@ function Demo(args) { : 'empty gray'; const constructEl = c => ( -
+

{c.name}

diff --git a/client/src/components/instance.component.jsx b/client/src/components/instance.component.jsx index b5e98674..23b0148a 100644 --- a/client/src/components/instance.component.jsx +++ b/client/src/components/instance.component.jsx @@ -1,9 +1,6 @@ -const { Component } = require('preact'); const preact = require('preact'); const { connect } = require('preact-redux'); -const Hammer = require('hammerjs'); - const Vbox = require('./vbox.component'); const InfoContainer = require('./info.container'); const InstanceConstructsContainer = require('./instance.constructs'); @@ -16,12 +13,10 @@ const addState = connect( const { instance, nav, - navInstance, } = state; return { instance, nav, - navInstance, }; }, @@ -30,10 +25,6 @@ const addState = connect( return dispatch(actions.setInfo(c)); } - function setNavInstance(c) { - return dispatch(actions.setNavInstance(c)); - } - function clearItems() { dispatch(actions.setCombiner([])); @@ -48,80 +39,38 @@ const addState = connect( return { setInfo, clearItems, - setNavInstance, }; } ); -class Instance extends Component { - shouldComponentUpdate(newProps) { - if (newProps.instance !== this.props.instance) return true; - return false; +function Instance(args) { + const { + instance, + clearItems, + } = args; + + if (!instance) return false; + + if (instance.phase !== 'InProgress') { + return ; } - render(args) { - const { - instance, - clearItems, - } = args; - - if (!instance) return false; - - if (instance.phase !== 'InProgress') { - return ; - } - - function instanceClick(e) { - e.stopPropagation(); - clearItems(); - } - - function onTouchMove(e) { - e.preventDefault(); - } - - return ( -
- - - -
- ); + function instanceClick(e) { + e.stopPropagation(); + clearItems(); } - componentDidMount() { - if (!this.h) this.bindSwipes(); + function onTouchMove(e) { + e.preventDefault(); } - componentDidUpdate() { - if (!this.h) this.bindSwipes(); - } - - bindSwipes() { - const instance = document.getElementById('instance'); - if (!instance) { - return setTimeout(this.bindSwipes, 50); - } - if (this.h) this.h.destroy(); - this.h = new Hammer(instance); - this.h.on('swiperight', () => { - const { - navInstance, - setNavInstance, - } = this.props; - setNavInstance(navInstance === 0 ? 3 : navInstance - 1); - }); - - this.h.on('swipeleft', () => { - const { - navInstance, - setNavInstance, - } = this.props; - setNavInstance((navInstance + 1) % 4); - }); - - return true; - } + return ( +
+ + + +
+ ); } module.exports = addState(Instance); diff --git a/client/src/components/instance.constructs.jsx b/client/src/components/instance.constructs.jsx index 1e010061..5168df19 100644 --- a/client/src/components/instance.constructs.jsx +++ b/client/src/components/instance.constructs.jsx @@ -1,5 +1,6 @@ const { connect } = require('preact-redux'); const preact = require('preact'); + const range = require('lodash/range'); const buttons = require('./buttons'); @@ -19,7 +20,6 @@ const addState = connect( account, itemInfo, itemEquip, - navInstance, tutorial, } = state; @@ -38,7 +38,6 @@ const addState = connect( sendVboxApply, itemInfo, itemEquip, - navInstance, sendUnequip, tutorial, }; @@ -77,7 +76,6 @@ function Construct(props) { iter, itemEquip, instance, - mobileVisible, player, tutorial, // Static Info @@ -220,7 +218,7 @@ function Construct(props) {
; }); - const classes = `instance-construct ${mobileVisible ? 'visible' : ''}`; + const classes = `instance-construct`; const avatarMouseOver = e => hoverInfo(e, `constructAvatar ${construct.name}`); return (
@@ -243,7 +241,6 @@ class InstanceConstructs extends preact.Component { shouldComponentUpdate(newProps) { if (newProps.itemEquip !== this.props.itemEquip) return true; if (newProps.tutorial !== this.props.tutorial) return true; - if (newProps.navInstance !== this.props.navInstance) return true; // JSON or Array objects if (newProps.player !== this.props.player) return true; if (newProps.instance !== this.props.instance) return true; @@ -255,7 +252,6 @@ class InstanceConstructs extends preact.Component { // Changing state variables itemEquip, instance, - navInstance, player, tutorial, // Static data @@ -274,7 +270,7 @@ class InstanceConstructs extends preact.Component { if (instance.phase === 'Lobby') return false; const constructs = range(0, 3).map(i => { - const tutorialConstruct = tutorialConstructDisplay(player, instance, tutorial, navInstance, i); + const tutorialConstruct = tutorialConstructDisplay(player, instance, tutorial, i); if (tutorialConstruct) return (tutorialConstruct); return Construct({ @@ -292,7 +288,6 @@ class InstanceConstructs extends preact.Component { setVboxHighlight, sendUnequip, tutorial, - mobileVisible: navInstance === i + 1, }); }); diff --git a/client/src/components/mnml.jsx b/client/src/components/mnml.jsx index 60dad587..17d3203f 100644 --- a/client/src/components/mnml.jsx +++ b/client/src/components/mnml.jsx @@ -10,21 +10,14 @@ const addState = connect( state => ({ showNav: state.showNav }) ); -class Mnml extends preact.Component { - shouldComponentUpdate(newProps) { - if (newProps.showNav !== this.props.showNav) return true; - return false; - } - - render(args) { - return ( -
-
- -
-
- ); - } +function Mnml(args) { + return ( +
+
+ +
+
+ ); } module.exports = addState(Mnml); diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index c2c1a51a..366f87af 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -20,7 +20,6 @@ const addState = connect( vboxSelected, itemInfo, itemUnequip, - navInstance, tutorial, } = state; @@ -57,7 +56,6 @@ const addState = connect( itemInfo, itemUnequip, sendItemUnequip, - navInstance, tutorial, }; }, @@ -100,7 +98,6 @@ class Vbox extends preact.Component { if (newProps.combiner !== this.props.combiner) return true; if (newProps.itemUnequip !== this.props.itemUnequip) return true; if (newProps.reclaiming !== this.props.reclaiming) return true; - if (newProps.navInstance !== this.props.navInstance) return true; if (newProps.tutorial !== this.props.tutorial) return true; if (newProps.vboxSelected !== this.props.vboxSelected) return true; if (newProps.player !== this.props.player) return true; @@ -116,7 +113,6 @@ class Vbox extends preact.Component { player, reclaiming, tutorial, - navInstance, vboxSelected, instance, @@ -439,7 +435,7 @@ class Vbox extends preact.Component { return setInfo(newInfo); } - const classes = `vbox ${navInstance === 0 ? 'visible' : ''}`; + const classes = `vbox`; return (
{vboxElement()} diff --git a/client/src/reducers.jsx b/client/src/reducers.jsx index d2d06f43..96d8001c 100644 --- a/client/src/reducers.jsx +++ b/client/src/reducers.jsx @@ -45,8 +45,6 @@ module.exports = { itemUnequip: createReducer([], 'SET_ITEM_UNEQUIP'), mtxActive: createReducer(null, 'SET_MTX_ACTIVE'), nav: createReducer(null, 'SET_NAV'), - navInstance: createReducer(0, 'SET_NAV_INSTANCE'), - showNav: createReducer(null, 'SET_SHOW_NAV'), ping: createReducer(null, 'SET_PING'), player: createReducer(null, 'SET_PLAYER'), reclaiming: createReducer(false, 'SET_RECLAIMING'), diff --git a/client/src/tutorial.utils.jsx b/client/src/tutorial.utils.jsx index 1cdf0dfb..ea4ade3e 100644 --- a/client/src/tutorial.utils.jsx +++ b/client/src/tutorial.utils.jsx @@ -1,11 +1,10 @@ const preact = require('preact'); const actions = require('./actions'); -function tutorialConstructDisplay(player, instance, tutorial, navInstance, i) { +function tutorialConstructDisplay(player, instance, tutorial, i) { if (instance.time_control === 'Practice' && instance.rounds.length === 1 && tutorial && tutorial < 6) { if (tutorial <= 2 || (tutorial > 2 && i > 0)) { - const mobileVisible = navInstance === i + 1; - const classes = `instance-construct ${mobileVisible ? 'visible' : ''}`; + const classes = `instance-construct`; return (
); } }