fix few bugs
This commit is contained in:
@@ -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 (
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user