fix few bugs

This commit is contained in:
ntr 2019-10-15 10:00:42 +11:00
parent 349c74c08e
commit f2a516b5f0
7 changed files with 30 additions and 33 deletions

View File

@ -3,12 +3,8 @@
*PRODUCTION*
* mobile styles
* mobile info page
* fix info page for tablet layout
* Add TOS and accept to register page
* fix purge bug
* add recipe book
* can't reset password without knowing password =\

View File

@ -205,7 +205,6 @@
.resolving-skill {
grid-area: target;
align-self: center;
text-align: center;
height: auto;
svg {
display: inline;

View File

@ -30,23 +30,21 @@ const store = createStore(
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(),
);
document.fonts.load('16pt "Jura"').then(() => {
const events = registerEvents(store);
// store.subscribe(() => console.log(store.getState()));
setupKeys(store);
const events = registerEvents(store);
// store.subscribe(() => console.log(store.getState()));
setupKeys(store);
const ws = createSocket(events);
ws.connect();
events.setWs(ws);
const ws = createSocket(events);
ws.connect();
events.setWs(ws);
const App = () => (
const App = () => (
<Provider store={store}>
<StripeProvider apiKey={stripeKey()}>
<Mnml />
</StripeProvider>
</Provider>
);
);
// eslint-disable-next-line
preact.render(<App />, document.body);
});
// eslint-disable-next-line
preact.render(<App />, document.body);

View File

@ -49,9 +49,10 @@ function GameCtrlTopBtns(args) {
};
const abandonClasses = `abandon ${abandonState ? 'confirming' : ''}`;
const abandonText = abandonState ? 'Confirm' : 'Abandon';
const abandonAction = abandonState ? sendAbandon : abandonStateTrue;
const abandonBtn = <button class={abandonClasses} disabled={finished} onClick={abandonAction}>Abandon</button>;
const abandonBtn = <button class={abandonClasses} disabled={finished} onClick={abandonAction}>{abandonText}</button>;
const leaveBtn = <button class='abandon confirming' onClick={leave}>Leave</button>;
return (

View File

@ -49,9 +49,10 @@ function InstanceTopBtns(args) {
};
const abandonClasses = `abandon ${abandonState ? 'confirming' : ''}`;
const abandonText = abandonState ? 'Confirm' : 'Abandon';
const abandonAction = abandonState ? sendAbandon : abandonStateTrue;
const abandonBtn = <button class={abandonClasses} disabled={finished} onClick={abandonAction}>Abandon</button>;
const abandonBtn = <button class={abandonClasses} disabled={finished} onClick={abandonAction}>{abandonText}</button>;
const leaveBtn = <button class='abandon confirming' onClick={leave}>Leave</button>;
return (

View File

@ -248,12 +248,14 @@ function Vbox(args) {
function onClick(e) {
if (vboxSelecting) clearVboxSelected();
if (reclaiming) return sendVboxReclaim(i);
if (combiner.length > 2) return combinerChange([i]);
const combinerIndex = combiner.indexOf(i);
if (combinerIndex > -1) {
return combinerChange(without(combiner, i));
}
combiner.push(i);
return combinerChange(combiner);
}