info skills
This commit is contained in:
parent
c34ad7edd0
commit
33b519ed66
@ -10,7 +10,11 @@ html, body, .cryps {
|
|||||||
font-family: 'Jura';
|
font-family: 'Jura';
|
||||||
color: whitesmoke;
|
color: whitesmoke;
|
||||||
font-size: 16pt;
|
font-size: 16pt;
|
||||||
|
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
|
||||||
/* this is the sweet nectar to keep it full page*/
|
/* this is the sweet nectar to keep it full page*/
|
||||||
height: 99%;
|
height: 99%;
|
||||||
@ -401,6 +405,14 @@ header {
|
|||||||
justify-content: left;
|
justify-content: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.info-skills {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-skills .cryp-skill-btn {
|
||||||
|
border: 1px solid whitesmoke;
|
||||||
|
}
|
||||||
|
|
||||||
.info-stats {
|
.info-stats {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: row wrap;
|
flex-flow: row wrap;
|
||||||
@ -492,7 +504,7 @@ header {
|
|||||||
border-right-width: 0px;
|
border-right-width: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cryp-skill-btn:first-child {
|
.skills .cryp-skill-btn:first-child {
|
||||||
border-top-width: 0;
|
border-top-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -581,6 +593,10 @@ header {
|
|||||||
order: 99;
|
order: 99;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
font-size: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
.header-username {
|
.header-username {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
const preact = require('preact');
|
const preact = require('preact');
|
||||||
|
const range = require('lodash/range');
|
||||||
|
|
||||||
const { ITEMS: { SKILLS, SPECS, COLOURS } } = require('./constants');
|
const { ITEMS: { SKILLS, SPECS, COLOURS } } = require('./constants');
|
||||||
const { COLOUR_ICONS, STATS } = require('../utils');
|
const { COLOUR_ICONS, STATS } = require('../utils');
|
||||||
|
|
||||||
@ -84,6 +86,15 @@ function Info(args) {
|
|||||||
|
|
||||||
if (type === 'cryp') {
|
if (type === 'cryp') {
|
||||||
const cryp = value;
|
const cryp = value;
|
||||||
|
|
||||||
|
// onClick={() => setInfo('skill', { skill: s, cryp })}
|
||||||
|
const skills = range(0, 4).map(i => {
|
||||||
|
const s = cryp.skills[i]
|
||||||
|
? cryp.skills[i].skill
|
||||||
|
: (<span> </span>);
|
||||||
|
return <button key={i} className="cryp-skill-btn right" >{s}</button>;
|
||||||
|
});
|
||||||
|
|
||||||
const stats = Object.values(STATS).map((s, j) => (
|
const stats = Object.values(STATS).map((s, j) => (
|
||||||
<figure key={j} alt={s.stat} className={s.stat}>
|
<figure key={j} alt={s.stat} className={s.stat}>
|
||||||
{s.svg(`stat-icon ${s.colour}`)}
|
{s.svg(`stat-icon ${s.colour}`)}
|
||||||
@ -93,6 +104,9 @@ function Info(args) {
|
|||||||
return (
|
return (
|
||||||
<div className="instance-info">
|
<div className="instance-info">
|
||||||
<h5>{cryp.name}</h5>
|
<h5>{cryp.name}</h5>
|
||||||
|
<div className="info-skills">
|
||||||
|
{skills}
|
||||||
|
</div>
|
||||||
<div className="info-stats">
|
<div className="info-stats">
|
||||||
{stats}
|
{stats}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -88,14 +88,11 @@ function Vbox(args) {
|
|||||||
|
|
||||||
let boundTimer;
|
let boundTimer;
|
||||||
function boundTouchStart(e, i) {
|
function boundTouchStart(e, i) {
|
||||||
e.preventDefault();
|
// e.preventDefault();
|
||||||
e.stopPropagation();
|
// e.stopPropagation();
|
||||||
boundTimer = (setTimeout(() => {
|
boundTimer = (setTimeout(() => {
|
||||||
const insert = combiner.findIndex(j => j === null);
|
|
||||||
if (insert === -1) return setCombiner([i, null, null]);
|
|
||||||
combiner[insert] = i;
|
|
||||||
boundTimer = null;
|
boundTimer = null;
|
||||||
return setCombiner(combiner);
|
return setActiveVar(i);
|
||||||
}, LONG_TOUCH_TIME));
|
}, LONG_TOUCH_TIME));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -105,7 +102,12 @@ function Vbox(args) {
|
|||||||
clearTimeout(boundTimer);
|
clearTimeout(boundTimer);
|
||||||
|
|
||||||
if (reclaiming && i) sendVboxReclaim(i);
|
if (reclaiming && i) sendVboxReclaim(i);
|
||||||
else if (vbox.bound[i]) setActiveVar(i);
|
else if (vbox.bound[i]) {
|
||||||
|
const insert = combiner.findIndex(j => j === null);
|
||||||
|
if (insert === -1) return setCombiner([i, null, null]);
|
||||||
|
combiner[insert] = i;
|
||||||
|
return setCombiner(combiner);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user