Visual changes, refactor

This commit is contained in:
Ilya Ig. Petrov 2017-05-26 08:34:58 -07:00
parent 40f5f134e1
commit 057b6bfc45
3 changed files with 16 additions and 11 deletions

View File

@ -9,10 +9,10 @@ export default function getExceptions(theState) {
const scopedCss = css`
#excMods {
.excMods {
padding-top: 1em;
}
#excMods input#mods-if-mind-exceptions:not(:checked) + .label-container label {
.excMods input#mods-ifMindExceptions:not(:checked) + * > label {
color: red;
}
@ -41,13 +41,14 @@ export default function getExceptions(theState) {
:
(<div>
{createElement(ExcEditor, props)}
<ul id="excMods">
<ul class={scopedCss.excMods}>
{
props.apis.pacKitchen.getOrderedConfigs('exceptions').map((conf) => {
return <InfoLi
conf={conf}
type="checkbox"
conf={conf}
idPrefix="mods-"
checked={conf.value}
disabled={props.ifInputsDisabled}
onClick={(evt) => {

View File

@ -10,7 +10,7 @@ export default function getInfoLi() {
flex-grow: 9;
padding-left: 0.3em;
/* Vertical align to middle. */
align-self: flex-end;
/*align-self: flex-end;*/
line-height: 100%;
}
@ -25,6 +25,10 @@ export default function getInfoLi() {
position: relative;
flex-wrap: wrap;
}
.infoRow > input[type="checkbox"] {
position: relative;
top: -0.08em;
}
.rightBottomIcon {
margin-left: 0.1em;
vertical-align: bottom;

View File

@ -460,7 +460,7 @@ PROXY foobar.com:8080; # Not HTTP!`.trim()}
}
let waitingNewValues = [];
let waitingTillMount = [];
return class ProxyEditor extends Component {
@ -474,22 +474,22 @@ PROXY foobar.com:8080; # Not HTTP!`.trim()}
ifExportsMode: false,
};
this.handleSwitch = () => this.setState({ifExportsMode: !this.state.ifExportsMode});
waitingNewValues.push(newValue); // Wait till mount or eat bugs.
waitingTillMount.push(newValue); // Wait till mount or eat bugs.
}
componentDidMount() {
if (waitingNewValues.length) {
this.mayEmitNewValue(this.props.value, waitingNewValues.pop());
waitingNewValues = [];
if (waitingTillMount.length) {
this.mayEmitNewValue(this.props.value, waitingTillMount.pop());
waitingTillMount = [];
}
}
componentDidUnmount() {
waitingNewValues = [];
waitingTillMount = [];
}