fix: marketplace collections, weather settings

This commit is contained in:
David Ralph
2022-08-29 10:50:27 +01:00
parent 77d68fc469
commit 12f8cf6a90
3 changed files with 9 additions and 31 deletions

View File

@@ -59,6 +59,7 @@ export default class TimeSettings extends PureComponent {
}
render() {
const weatherType = localStorage.getItem('weatherType');
return (
<>
<Header
@@ -70,11 +71,11 @@ export default class TimeSettings extends PureComponent {
switch={true}
/>
<SettingsItem title={variables.getMessage('modals.main.settings.sections.weather.widget_type')}>
<Dropdown label="Type" name="weatherType" category="weather">
<Dropdown label={variables.getMessage('modals.main.settings.sections.time.type')} name="weatherType" category="weather" onChange={() => this.forceUpdate()}>
<option value="1">{variables.getMessage('modals.main.settings.sections.weather.options.basic')}</option>
<option value="2">{variables.getMessage('modals.main.settings.sections.weather.standard')}</option>
<option value="3">{variables.getMessage('modals.main.settings.sections.weather.expanded')}</option>
<option value="4">{variables.getMessage('modals.main.settings.sections.weather.custom')}</option>
<option value="2">{variables.getMessage('modals.main.settings.sections.weather.options.standard')}</option>
<option value="3">{variables.getMessage('modals.main.settings.sections.weather.options.expanded')}</option>
<option value="4">{variables.getMessage('modals.main.settings.sections.weather.options.custom')}</option>
</Dropdown>
</SettingsItem>
<SettingsItem
@@ -94,6 +95,7 @@ export default class TimeSettings extends PureComponent {
</SettingsItem>
<SettingsItem
title={variables.getMessage('modals.main.settings.sections.weather.temp_format.title')}
final={weatherType !== '4'}
>
<Radio
name="tempformat"
@@ -122,10 +124,10 @@ export default class TimeSettings extends PureComponent {
category="weather"
/>
</SettingsItem>
{localStorage.getItem('weatherType') === 4 && (
{weatherType === '4' && (
<SettingsItem title={variables.getMessage(
'modals.main.settings.sections.weather.custom_settings',
)}>
)} final={true}>
<Checkbox
name="weatherdescription"
text={variables.getMessage(