[update] reduce collection search to fit on screen

This commit is contained in:
Daniel 2019-05-13 18:09:54 -04:00
parent cf4b021f6a
commit bf071fbfac
5 changed files with 48 additions and 42 deletions

File diff suppressed because one or more lines are too long

View File

@ -19,7 +19,7 @@ object-assign
@license MIT @license MIT
*/ */
/** @license React v16.7.0 /** @license React v16.8.6
* react.production.min.js * react.production.min.js
* *
* Copyright (c) Facebook, Inc. and its affiliates. * Copyright (c) Facebook, Inc. and its affiliates.
@ -28,7 +28,7 @@ object-assign
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
/** @license React v16.7.0 /** @license React v16.8.6
* react-dom.production.min.js * react-dom.production.min.js
* *
* Copyright (c) Facebook, Inc. and its affiliates. * Copyright (c) Facebook, Inc. and its affiliates.
@ -37,7 +37,7 @@ object-assign
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
/** @license React v0.12.0 /** @license React v0.13.6
* scheduler.production.min.js * scheduler.production.min.js
* *
* Copyright (c) Facebook, Inc. and its affiliates. * Copyright (c) Facebook, Inc. and its affiliates.

File diff suppressed because one or more lines are too long

View File

@ -168,8 +168,8 @@ export default class SearchCollection extends React.Component {
render() { render() {
if (this.loaded == false) { if (this.loaded == false) {
API.LoadDB([{'cards': 'attacks'}, {'cards': 'battlegear'}, {'cards': 'creatures'}, {'cards': 'locations'}, {'cards': 'mugic'}]) API.LoadDB([{'cards': 'attacks'}, {'cards': 'battlegear'}, {'cards': 'creatures'}, {'cards': 'locations'}, {'cards': 'mugic'}])
.then(() => { .then(() => {
this.loaded = true; this.loaded = true;
this.search(); this.search();
}); });
return (<Loading />); return (<Loading />);
@ -226,35 +226,27 @@ export default class SearchCollection extends React.Component {
<div className="text-entry"> <div className="text-entry">
<input type="text" name="text" placeholder="Card Text" value={this.input.text} onChange={this.handleChange} /> <input type="text" name="text" placeholder="Card Text" value={this.input.text} onChange={this.handleChange} />
</div> </div>
<div className="text-entry">
<input type="text" name="subtypes" placeholder="Subtypes | Initiative" value={this.input.subtypes} onChange={this.handleChange} />
</div>
<br />
<div className="centeredCheckBox"> <div className="centeredCheckBox">
<label className="mull"><input type="checkbox" name="flavor" value={!this.input.flavor} onChange={(e) => {this.input.flavor = !e.target.checked}} />Ignore Flavortext</label> <label className="mull"><input type="checkbox" name="flavor" value={!this.input.flavor} onChange={(e) => {this.input.flavor = !e.target.checked}} />Ignore Flavortext</label>
</div> </div>
<div className="centeredCheckBox"> <div className="text-entry">
<input type="text" name="subtypes" placeholder="Subtypes | Initiative" value={this.input.subtypes} onChange={this.handleChange} />
</div>
<div className="centeredCheckBox centeredSpacing">
<label className="mull"><input type="checkbox" name="past" checked={this.input.past} onChange={this.handleChange} />Past</label> <label className="mull"><input type="checkbox" name="past" checked={this.input.past} onChange={this.handleChange} />Past</label>
</div>
<div className="centeredCheckBox">
<label className="mull"><input type="checkbox" name="mirage" checked={this.input.mirage} onChange={this.handleChange} />Mirage</label> <label className="mull"><input type="checkbox" name="mirage" checked={this.input.mirage} onChange={this.handleChange} />Mirage</label>
</div>
<div className="centeredCheckBox">
<label className="mull"><input type="checkbox" name="minion" checked={this.input.minion} onChange={this.handleChange} />Minion</label> <label className="mull"><input type="checkbox" name="minion" checked={this.input.minion} onChange={this.handleChange} />Minion</label>
</div> </div>
<div className="centeredCheckBox"> <br />
<div className="centeredCheckBox centeredSpacing">
<label className="mull"><input type="checkbox" name="unique" checked={this.input.mull.unique} onChange={e => this.handleChange(e, "mull")} />Unique</label> <label className="mull"><input type="checkbox" name="unique" checked={this.input.mull.unique} onChange={e => this.handleChange(e, "mull")} />Unique</label>
</div>
<div className="centeredCheckBox">
<label className="mull"><input type="checkbox" name="loyal" checked={this.input.mull.loyal} onChange={e => this.handleChange(e, "mull")} />Loyal</label> <label className="mull"><input type="checkbox" name="loyal" checked={this.input.mull.loyal} onChange={e => this.handleChange(e, "mull")} />Loyal</label>
</div>
<div className="centeredCheckBox">
<label className="mull"><input type="checkbox" name="legendary" checked={this.input.mull.legendary} onChange={e => this.handleChange(e, "mull")} />Legendary</label> <label className="mull"><input type="checkbox" name="legendary" checked={this.input.mull.legendary} onChange={e => this.handleChange(e, "mull")} />Legendary</label>
</div> </div>
<div className="centeredCheckBox"> <div className="centeredCheckBox">
<label className="mull"><input type="checkbox" name="mixed" checked={this.input.mull.mixed} onChange={e => this.handleChange(e, "mull")} />Non-Loyal</label> <label className="mull"><input type="checkbox" name="mixed" checked={this.input.mull.mixed} onChange={e => this.handleChange(e, "mull")} />Non-Loyal</label>
</div> </div>
<br /><hr /> <hr />
<div className="tribes"> <div className="tribes">
{tribes} {tribes}
</div> </div>
@ -269,22 +261,17 @@ export default class SearchCollection extends React.Component {
</div> </div>
<hr /> <hr />
<div className="disciplines"> <div className="disciplines">
{disciplines} {disciplines}
</div> </div>
<hr />
<Collapsible open={true} trigger="Energy"> <Collapsible open={true} trigger="Energy">
<div className="minMax"> <div className="minMax">
<label className="mcbp">Min <input type="text" name="min" value={this.input.energy.min} onChange={e => this.handleChange(e, "energy")} /></label> <label className="mcbp">Min <input type="text" name="min" value={this.input.energy.min} onChange={e => this.handleChange(e, "energy")} /></label>
</div>
<div className="minMax">
<label className="mcbp">Max <input type="text" name="max" value={this.input.energy.max} onChange={e => this.handleChange(e, "energy")} /></label> <label className="mcbp">Max <input type="text" name="max" value={this.input.energy.max} onChange={e => this.handleChange(e, "energy")} /></label>
</div> </div>
</Collapsible> </Collapsible>
<Collapsible open={true} trigger="Build Points & Mugic Counters/Cost"> <Collapsible open={true} trigger="Build Points&#10;Mugic Counters/Cost">
<div className="minMax"> <div className="minMax">
<label className="mcbp">Min <input type="text" name="min" value={this.input.mcbp.min} onChange={e => this.handleChange(e, "mcbp")} /></label> <label className="mcbp">Min <input type="text" name="min" value={this.input.mcbp.min} onChange={e => this.handleChange(e, "mcbp")} /></label>
</div>
<div className="minMax">
<label className="mcbp">Max <input type="text" name="max" value={this.input.mcbp.max} onChange={e => this.handleChange(e, "mcbp")} /></label> <label className="mcbp">Max <input type="text" name="max" value={this.input.mcbp.max} onChange={e => this.handleChange(e, "mcbp")} /></label>
</div> </div>
</Collapsible> </Collapsible>

View File

@ -42,13 +42,17 @@
input[type="text"] { input[type="text"] {
margin-bottom: 2px; margin-bottom: 2px;
width: 200px;
border-radius: 5px; border-radius: 5px;
border-color: transparent; border-color: transparent;
text-align: center; text-align: center;
outline: none; outline: none;
} }
input[type="text"],
.centeredCheckBox {
width: 220px;
}
.text-entry { .text-entry {
display: flex; display: flex;
@ -68,11 +72,7 @@
.left, .left,
.right, .right,
.stats { .stats {
padding-top: 2px; padding-top: 4px;
}
.stats {
padding-top: 2%;
} }
.bigger { .bigger {
@ -112,7 +112,6 @@
float: left; float: left;
text-align: right; text-align: right;
width: 40px; width: 40px;
padding-right: 4px;
} }
.SearchForm { .SearchForm {
@ -130,10 +129,14 @@
.centeredCheckBox { .centeredCheckBox {
margin: 0 auto; margin: 0 auto;
width: 43%;
text-align: left; text-align: left;
} }
.centeredSpacing {
display: flex;
justify-content: space-between;
}
.setBox { .setBox {
width: 80%; width: 80%;
float: right; float: right;
@ -158,8 +161,10 @@
} }
.minMax { .minMax {
display: flex;
justify-content: space-between;
margin: 0 auto; margin: 0 auto;
width: 25%; width: 50%;
text-align: right; text-align: right;
} }
@ -181,11 +186,21 @@
margin-top: 2px; margin-top: 2px;
} }
.mull input {
margin-left: 0px;
margin-top: 1px;
}
.mull input, .mull input,
.Collapsible__contentInner input { .Collapsible__contentInner input {
vertical-align: middle; vertical-align: middle;
} }
.Collapsible__contentInner
.centeredCheckBox {
width: 50%;
}
.mcbp input { .mcbp input {
width: 24px; width: 24px;
height: 14px; height: 14px;
@ -230,8 +245,9 @@
} }
.Collapsible { .Collapsible {
margin-bottom: 10px; margin-bottom: 5px;
width: 250px; margin-top: 5px;
width: 96%;
} }
.Collapsible__trigger { .Collapsible__trigger {
@ -241,6 +257,8 @@
padding-top: 5px; padding-top: 5px;
padding-bottom: 5px; padding-bottom: 5px;
text-indent: 5px; text-indent: 5px;
font-weight: bold;
white-space: pre;
} }
.Collapsible__trigger:hover { .Collapsible__trigger:hover {
@ -269,11 +287,12 @@
} }
.Collapsible__contentOuter { .Collapsible__contentOuter {
width: 96%; // width: 96%;
} }
.Collapsible__contentInner { .Collapsible__contentInner {
width: 96%; // width: 96%;
margin-top: 5px;
} }
.left { .left {