Merge branch 'release/1.12.2' of ssh://git.mnml.gg:40022/~/mnml into release/1.12.2

This commit is contained in:
ntr 2020-01-17 15:58:21 +10:00
commit 62b8fa37a4
5 changed files with 9 additions and 8 deletions

View File

@ -10,6 +10,7 @@ const addState = connect(
chatShow,
instance,
account,
tutorial,
} = state;
function sendReady() {
@ -21,6 +22,7 @@ const addState = connect(
instance,
chatShow,
account,
tutorial,
sendReady,
};
@ -42,17 +44,17 @@ function InstanceCtrlBtns(args) {
instance,
chatShow,
account,
tutorial,
sendReady,
setChatShow,
} = args;
const finished = instance && instance.phase === 'Finished';
const tutorialDisable = tutorial && tutorial < 8;
return (
<div class="instance-ctrl-btns">
<button disabled={!account.subscribed} onClick={() => setChatShow(!chatShow)}>Chat</button>
<button disabled={finished} class="ready" onClick={() => sendReady()}>Ready</button>
<button disabled={finished || tutorialDisable} class="ready" onClick={() => sendReady()}>Ready</button>
</div>
);
}

View File

@ -95,7 +95,7 @@ function Play(args) {
type="submit">
Invite
</button>
<figcaption>Invite a Friend</figcaption>
<figcaption>Play against friend</figcaption>
</figure>
);

View File

@ -116,7 +116,6 @@ function registerEvents(store) {
}
store.dispatch(actions.setAccount(account));
store.dispatch(actions.setTutorial(null));
store.dispatch(actions.setAuthenticated(true));
}
@ -189,7 +188,6 @@ function registerEvents(store) {
}
}
return store.dispatch(actions.setInstance(v));
}

View File

@ -53,7 +53,7 @@ module.exports = {
teamPage: createReducer(0, 'SET_TEAM_PAGE'),
teamSelect: createReducer([null, null, null], 'SET_TEAM_SELECT'),
tutorial: createReducer(1, 'SET_TUTORIAL'),
tutorial: createReducer(localStorage.getItem('tutorial-complete') ? null : 1, 'SET_TUTORIAL'),
vboxSelected: createReducer({ storeSelect: [], stashSelect: [] }, 'SET_VBOX_SELECTED'),
vboxCombiner: createReducer(null, 'SET_VBOX_COMBINER'),

View File

@ -197,10 +197,10 @@ function tutorialStage(tutorial, clearTutorial, instance) {
}
if (tutorial === 8) {
localStorage.setItem('tutorial-complete', true);
if (window.innerWidth < 1000) {
return exit();
}
return (
<div class='info-item'>
<h2>GLHF</h2>
@ -210,6 +210,7 @@ function tutorialStage(tutorial, clearTutorial, instance) {
</div>
);
}
return false;
};