log fix
This commit is contained in:
parent
24ffae70fc
commit
bedd6814a7
@ -4,11 +4,8 @@ const range = require('lodash/range');
|
||||
const { STATS, eventClasses, getCombatText, crypAvatar } = require('../utils');
|
||||
|
||||
const GameCryp = require('./game.cryp');
|
||||
const SkillBtn = require('./skill.btn');
|
||||
const TargetingArrows = require('./targeting.arrows');
|
||||
|
||||
// const SKILL_HOT_KEYS = ['Q', 'W', 'E', 'R'];
|
||||
|
||||
function GamePanel(props) {
|
||||
const {
|
||||
game,
|
||||
@ -19,22 +16,23 @@ function GamePanel(props) {
|
||||
selectSkillTarget,
|
||||
sendInstanceState,
|
||||
sendGameReady,
|
||||
activeCryp,
|
||||
account,
|
||||
showAlt,
|
||||
showLog,
|
||||
toggleLog,
|
||||
quit,
|
||||
} = props;
|
||||
|
||||
if (!game) return <div>...</div>;
|
||||
if (showAlt) {
|
||||
|
||||
console.log(showLog);
|
||||
if (showLog) {
|
||||
const logs = game.log.map((l, i) => (<div key={i}>{l}</div>)).reverse();
|
||||
return (
|
||||
<main className="game">
|
||||
<div className="instance-hdr">
|
||||
<button
|
||||
className="game-btn instance-btn instance-ui-btn left"
|
||||
onClick={() => toggleLog(!showAlt)}>
|
||||
onClick={() => toggleLog(!showLog)}>
|
||||
Game
|
||||
</button>
|
||||
<div className="spacer">
|
||||
@ -62,7 +60,7 @@ function GamePanel(props) {
|
||||
</button>
|
||||
<button
|
||||
className="game-btn instance-btn instance-ui-btn left"
|
||||
onClick={() => toggleLog(!showAlt)}>
|
||||
onClick={() => toggleLog(!showLog)}>
|
||||
Log
|
||||
</button>
|
||||
<div className="spacer">
|
||||
|
||||
@ -11,7 +11,7 @@ const addState = connect(
|
||||
game,
|
||||
account,
|
||||
resolution,
|
||||
showAlt,
|
||||
showLog,
|
||||
activeSkill,
|
||||
activeCryp,
|
||||
} = state;
|
||||
@ -39,7 +39,7 @@ const addState = connect(
|
||||
|
||||
return {
|
||||
game,
|
||||
showAlt,
|
||||
showLog,
|
||||
account,
|
||||
resolution,
|
||||
activeSkill,
|
||||
|
||||
@ -60,17 +60,7 @@ function Vbox(args) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const freeHighlight = () => {
|
||||
if (!info[0] || info[0] !== 'highlight') return false;
|
||||
return vbox.bound.some(b => {
|
||||
const v = vboxInfo.vars.find(vi => vi.v === b);
|
||||
if (info[1] === 'skill') return v.skill;
|
||||
if (info[1] === 'spec') return v.spec;
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
const freeShouldHighlight = freeHighlight();
|
||||
const freeShouldHighlight = info[0] && info[0] === 'highlight';
|
||||
|
||||
const freeRows = free.map((row, i) => {
|
||||
const cells = row.map((c, j) => {
|
||||
|
||||
@ -36,6 +36,7 @@ const store = createStoreWithMiddleware(
|
||||
selectedCryps: reducers.selectedCrypsReducer,
|
||||
vboxInfo: reducers.vboxInfoReducer,
|
||||
vboxHidden: reducers.vboxHiddenReducer,
|
||||
showLog: reducers.showLogReducer,
|
||||
ws: reducers.wsReducer,
|
||||
})
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user