mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-27 20:03:45 +03:00
Fix input props and ProxyEditor css accordingly
This commit is contained in:
parent
48943c77cd
commit
74d85965d2
|
@ -88,9 +88,6 @@ export default function getInfoLi() {
|
|||
|
||||
/* CHILDREN */
|
||||
|
||||
input:not(:checked) ~ .children {
|
||||
display: none;
|
||||
}
|
||||
.children {
|
||||
flex-grow: 9999;
|
||||
}
|
||||
|
@ -118,9 +115,21 @@ export default function getInfoLi() {
|
|||
}, props);
|
||||
|
||||
const iddy = props.idPrefix + ( props.ifDashify ? camelToDash(props.conf.key) : props.conf.key );
|
||||
|
||||
const inputProps = {
|
||||
id: iddy,
|
||||
name: props.name,
|
||||
type: props.type,
|
||||
checked: props.checked,
|
||||
onClick: props.onClick,
|
||||
onChange: props.onChange,
|
||||
class: props.class,
|
||||
};
|
||||
delete inputProps.children;
|
||||
|
||||
return (
|
||||
<li class={scopedCss.infoRow + ' horFlex'} style={ props.children && 'flex-wrap: wrap'}>
|
||||
{ createElement('input', Object.assign({}, props, {id: iddy})) }
|
||||
{createElement('input', inputProps)}
|
||||
<div class={scopedCss.labelContainer}>
|
||||
<label for={iddy} dangerouslySetInnerHTML={{__html: props.conf.label}}></label>
|
||||
{props.nodeAfterLabel}
|
||||
|
@ -136,8 +145,8 @@ export default function getInfoLi() {
|
|||
: (<span> </span>) // Affects vertical align of flexbox items.
|
||||
)
|
||||
}
|
||||
{ props.checked && props.children }
|
||||
{/* props.checked && (<div class={scopedCss.children}>{props.children}</div>)*/}
|
||||
{/* props.checked && props.children */}
|
||||
{props.checked && props.children && (<div class={scopedCss.children}>{props.children}</div>)}
|
||||
</li>
|
||||
);
|
||||
|
||||
|
|
|
@ -7,10 +7,6 @@ export default function getProxyEditor(theState) {
|
|||
|
||||
const scopedCss = css`
|
||||
|
||||
form.root {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.editor {
|
||||
border-collapse: collapse;
|
||||
/*border-style: hidden;*/
|
||||
|
@ -19,6 +15,10 @@ export default function getProxyEditor(theState) {
|
|||
background-color: #f3f5f6;
|
||||
}
|
||||
|
||||
.tabledEditor, .exportsEditor {
|
||||
/* Empty, but not undefined. */
|
||||
}
|
||||
|
||||
table.editor ::-webkit-input-placeholder {
|
||||
color: #c9c9c9;
|
||||
}
|
||||
|
@ -110,9 +110,10 @@ export default function getProxyEditor(theState) {
|
|||
}
|
||||
|
||||
/* LAST COLUMN: BUTTONS */
|
||||
table.editor tr > *:nth-last-child(1),
|
||||
table.editor tr > *:nth-last-child(2),
|
||||
table.editor tr.proxyRow > td:first-child {
|
||||
table.editor tr > *:nth-last-child(1), /* Buttons */
|
||||
table.tabledEditor tr > *:nth-last-child(2), /* Port */
|
||||
table.tabledEditor tr.proxyRow > td:first-child /* Type */
|
||||
{
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
|
@ -258,8 +259,8 @@ export default function getProxyEditor(theState) {
|
|||
render(props) {
|
||||
|
||||
return (
|
||||
<form onSubmit={linkEvent(this, this.handleSubmit)} class={scopedCss.root}>
|
||||
<table class={scopedCss.editor}>
|
||||
<form onSubmit={linkEvent(this, this.handleSubmit)}>
|
||||
<table class={scopedCss.editor + ' ' + scopedCss.tabledEditor}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2" class={scopedCss.shrink}>протокол</th>
|
||||
|
@ -453,8 +454,8 @@ export default function getProxyEditor(theState) {
|
|||
const reset = linkEvent(this, this.resetState);
|
||||
|
||||
return (
|
||||
<form onSubmit={linkEvent(this, this.handleSubmit)} class={scopedCss.root}>
|
||||
<table class={scopedCss.editor}>
|
||||
<form onSubmit={linkEvent(this, this.handleSubmit)}>
|
||||
<table class={scopedCss.editor + ' ' + scopedCss.exportsEditor}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 100%">
|
||||
|
|
Loading…
Reference in New Issue
Block a user