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

View File

@ -10,7 +10,7 @@ export default function getInfoLi() {
flex-grow: 9; flex-grow: 9;
padding-left: 0.3em; padding-left: 0.3em;
/* Vertical align to middle. */ /* Vertical align to middle. */
align-self: flex-end; /*align-self: flex-end;*/
line-height: 100%; line-height: 100%;
} }
@ -25,6 +25,10 @@ export default function getInfoLi() {
position: relative; position: relative;
flex-wrap: wrap; flex-wrap: wrap;
} }
.infoRow > input[type="checkbox"] {
position: relative;
top: -0.08em;
}
.rightBottomIcon { .rightBottomIcon {
margin-left: 0.1em; margin-left: 0.1em;
vertical-align: bottom; 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 { return class ProxyEditor extends Component {
@ -474,22 +474,22 @@ PROXY foobar.com:8080; # Not HTTP!`.trim()}
ifExportsMode: false, ifExportsMode: false,
}; };
this.handleSwitch = () => this.setState({ifExportsMode: !this.state.ifExportsMode}); 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() { componentDidMount() {
if (waitingNewValues.length) { if (waitingTillMount.length) {
this.mayEmitNewValue(this.props.value, waitingNewValues.pop()); this.mayEmitNewValue(this.props.value, waitingTillMount.pop());
waitingNewValues = []; waitingTillMount = [];
} }
} }
componentDidUnmount() { componentDidUnmount() {
waitingNewValues = []; waitingTillMount = [];
} }