cleanup
This commit is contained in:
parent
0a812dc2c3
commit
354d8be3a0
3 changed files with 32 additions and 74 deletions
|
@ -47,7 +47,6 @@ export class FormFieldPrice extends React.PureComponent<Props> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<fieldset-group class="fieldset-group--smushed">
|
<fieldset-group class="fieldset-group--smushed">
|
||||||
<fieldset-section>
|
|
||||||
<FormField
|
<FormField
|
||||||
name={`${name}_amount`}
|
name={`${name}_amount`}
|
||||||
label={__('Price')}
|
label={__('Price')}
|
||||||
|
@ -60,8 +59,6 @@ export class FormFieldPrice extends React.PureComponent<Props> {
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
step={step || 'any'}
|
step={step || 'any'}
|
||||||
/>
|
/>
|
||||||
</fieldset-section>
|
|
||||||
<fieldset-section>
|
|
||||||
<FormField
|
<FormField
|
||||||
label={__('Currency')}
|
label={__('Currency')}
|
||||||
name={`${name}_currency`}
|
name={`${name}_currency`}
|
||||||
|
@ -75,7 +72,6 @@ export class FormFieldPrice extends React.PureComponent<Props> {
|
||||||
<option value="LBC">{__('LBRY Credits (LBC)')}</option>
|
<option value="LBC">{__('LBRY Credits (LBC)')}</option>
|
||||||
<option value="USD">{__('US Dollars')}</option>
|
<option value="USD">{__('US Dollars')}</option>
|
||||||
</FormField>
|
</FormField>
|
||||||
</fieldset-section>
|
|
||||||
</fieldset-group>
|
</fieldset-group>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,7 +207,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
const connectionOptions = [1, 2, 4, 6, 10, 20];
|
const connectionOptions = [1, 2, 4, 6, 10, 20];
|
||||||
const startHours = ['18', '19', '20', '21'];
|
const startHours = ['18', '19', '20', '21'];
|
||||||
const endHours = ['5', '6', '7', '8'];
|
const endHours = ['5', '6', '7', '8'];
|
||||||
const enabledMinutes = ['00', '15', '30', '45'];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
|
@ -453,17 +452,14 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
checked={automaticDarkModeEnabled}
|
checked={automaticDarkModeEnabled}
|
||||||
label={__('Automatic dark mode')}
|
label={__('Automatic dark mode')}
|
||||||
/>
|
/>
|
||||||
|
{automaticDarkModeEnabled && (
|
||||||
<Form>
|
|
||||||
<h3>{__('From: ')}</h3>
|
|
||||||
<fieldset-group class="fieldset-group--smushed">
|
<fieldset-group class="fieldset-group--smushed">
|
||||||
<FormField
|
<FormField
|
||||||
type="select"
|
type="select"
|
||||||
name="automatic_dark_mode_range"
|
name="automatic_dark_mode_range"
|
||||||
disabled={!automaticDarkModeEnabled}
|
|
||||||
onChange={value => this.onChangeTime(value, { fromTo: 'from', time: 'hour' })}
|
onChange={value => this.onChangeTime(value, { fromTo: 'from', time: 'hour' })}
|
||||||
value={darkModeTimes.from.hour}
|
value={darkModeTimes.from.hour}
|
||||||
label={__('Hours:')}
|
label={__('From')}
|
||||||
>
|
>
|
||||||
{startHours.map(time => (
|
{startHours.map(time => (
|
||||||
<option key={time} value={time}>
|
<option key={time} value={time}>
|
||||||
|
@ -472,30 +468,9 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
))}
|
))}
|
||||||
</FormField>
|
</FormField>
|
||||||
<FormField
|
<FormField
|
||||||
label={__('minutes')}
|
|
||||||
type="select"
|
type="select"
|
||||||
name="automatic_dark_mode_range"
|
name="automatic_dark_mode_range"
|
||||||
disabled={!automaticDarkModeEnabled}
|
label={__('To')}
|
||||||
onChange={value => this.onChangeTime(value, { fromTo: 'from', time: 'min' })}
|
|
||||||
value={darkModeTimes.from.min}
|
|
||||||
>
|
|
||||||
{enabledMinutes.map(time => (
|
|
||||||
<option key={time} value={time}>
|
|
||||||
{time}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</FormField>
|
|
||||||
</fieldset-group>
|
|
||||||
</Form>
|
|
||||||
|
|
||||||
<Form>
|
|
||||||
<h3>{__('To: ')}</h3>
|
|
||||||
<fieldset-group class="fieldset-group--smushed">
|
|
||||||
<FormField
|
|
||||||
type="select"
|
|
||||||
name="automatic_dark_mode_range"
|
|
||||||
disabled={!automaticDarkModeEnabled}
|
|
||||||
label={__('Hours:')}
|
|
||||||
onChange={value => this.onChangeTime(value, { fromTo: 'to', time: 'hour' })}
|
onChange={value => this.onChangeTime(value, { fromTo: 'to', time: 'hour' })}
|
||||||
value={darkModeTimes.to.hour}
|
value={darkModeTimes.to.hour}
|
||||||
>
|
>
|
||||||
|
@ -505,22 +480,8 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</FormField>
|
</FormField>
|
||||||
<FormField
|
|
||||||
label={__('minutes')}
|
|
||||||
type="select"
|
|
||||||
name="automatic_dark_mode_range"
|
|
||||||
disabled={!automaticDarkModeEnabled}
|
|
||||||
onChange={value => this.onChangeTime(value, { fromTo: 'to', time: 'min' })}
|
|
||||||
value={darkModeTimes.to.min}
|
|
||||||
>
|
|
||||||
{enabledMinutes.map(time => (
|
|
||||||
<option key={time} value={time}>
|
|
||||||
{time}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</FormField>
|
|
||||||
</fieldset-group>
|
</fieldset-group>
|
||||||
</Form>
|
)}
|
||||||
</fieldset-section>
|
</fieldset-section>
|
||||||
</Form>
|
</Form>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -118,8 +118,9 @@ fieldset-group {
|
||||||
width: auto;
|
width: auto;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
||||||
&:first-of-type {
|
&:first-child {
|
||||||
input {
|
input,
|
||||||
|
select {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
|
|
Loading…
Reference in a new issue