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

This commit is contained in:
Mashy
2019-11-06 16:04:06 +10:00
10 changed files with 2806 additions and 82 deletions
+12 -1
View File
@@ -7,15 +7,26 @@ const Controls = require('./controls');
const Footer = require('./footer');
const addState = connect(
state => ({ showNav: state.showNav })
({ game, instance }) => ({ game, instance })
);
function Mnml(args) {
const {
game,
instance,
} = args;
const rotateClass = (game || instance) && window.innerWidth < window.innerHeight
? 'show'
: '';
return (
<div id="mnml">
<Main />
<Controls />
<Footer />
<div id="rotate" class={rotateClass} >
</div>
</div>
);
}
+4 -2
View File
@@ -177,7 +177,7 @@ class Vbox extends preact.Component {
}
function availableBtn(v, group, index) {
if (!v) return <button disabled class='empty' >&nbsp;</button>;
if (!v) return <button disabled class='empty' key={(group + 1) * index} >&nbsp;</button>;
const selected = vboxSelected[0] === group && vboxSelected[1] === index;
// state not yet set in double click handler
@@ -219,6 +219,7 @@ class Vbox extends preact.Component {
onClick(ev);
ev.dataTransfer.setData('text', '')
}}
key={(group + 1) * index}
onDragEnd={clearVboxSelected}>
<button
class={classes}
@@ -278,7 +279,7 @@ class Vbox extends preact.Component {
const inventoryHighlight = vboxSelecting || itemUnequip.length;
if (!v && v !== 0) {
return <button disabled={!inventoryHighlight} class={inventoryHighlight ? 'receiving' : 'empty'} >&nbsp;</button>;
return <button key={i} disabled={!inventoryHighlight} class={inventoryHighlight ? 'receiving' : 'empty'} >&nbsp;</button>;
}
const combinerItems = combiner.map(j => vbox.bound[j]);
@@ -331,6 +332,7 @@ class Vbox extends preact.Component {
return (
<label
key={i}
draggable='true'
onDragStart={ev => {
onClick('drag');