mirror of
https://github.com/mue/mue.git
synced 2026-07-16 21:44:22 +02:00
feat: improved weather widget, fix marketplace and date widget etc
Co-authored-by: Alex Sparkes <turbomarshmello@gmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@ export default class AdvancedSettings extends React.PureComponent {
|
||||
<h3>{advanced.customisation}</h3>
|
||||
<Text title={advanced.custom_js} name='customjs' textarea={true}/>
|
||||
<Text title={advanced.custom_css} name='customcss' textarea={true}/>
|
||||
<Text title={advanced.tab_name} name='tabName'/>
|
||||
<Text title={advanced.tab_name} name='tabName' default={window.language.tabname}/>
|
||||
|
||||
<h3>{this.language.sections.experimental.title}</h3>
|
||||
<p>{advanced.experimental_warning}</p>
|
||||
|
||||
@@ -2,6 +2,7 @@ import React from 'react';
|
||||
|
||||
import Switch from '../Switch';
|
||||
import Radio from '../Radio';
|
||||
import Checkbox from '../Checkbox';
|
||||
|
||||
export default class TimeSettings extends React.PureComponent {
|
||||
constructor() {
|
||||
@@ -44,11 +45,18 @@ export default class TimeSettings extends React.PureComponent {
|
||||
<>
|
||||
<h2>{language.title}</h2>
|
||||
<Switch name='weatherEnabled' text={this.language.enabled} />
|
||||
<br/>
|
||||
<Radio name='tempformat' title='Temperature Format' options={tempFormat} />
|
||||
<ul>
|
||||
<p>Location <span className='modalLink' onClick={() => this.getLocation()}>Auto</span></p>
|
||||
<input type='text' value={this.state.location} onChange={(e) => this.setState({ location: e.target.value })}></input>
|
||||
</ul>
|
||||
<h3>Extra Information</h3>
|
||||
<Checkbox name='mintemp' text='Min temp'/>
|
||||
<Checkbox name='maxtemp' text='Max temp'/>
|
||||
<Checkbox name='humidity' text='Humidity'/>
|
||||
<Checkbox name='windspeed' text='Wind speed'/>
|
||||
<Checkbox name='windspeed' text='Atmospheric pressure'/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -51,6 +51,12 @@ export default class BackgroundSettings extends React.PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
marketplaceType = () => {
|
||||
if (localStorage.getItem('photo_packs')) {
|
||||
return <option value='photo_pack'>Marketplace</option>
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
localStorage.setItem('customBackground', this.state.customBackground);
|
||||
}
|
||||
@@ -107,7 +113,7 @@ export default class BackgroundSettings extends React.PureComponent {
|
||||
// API
|
||||
default: backgroundSettings = APISettings; break;
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<h2>{background.title}</h2>
|
||||
@@ -125,6 +131,7 @@ export default class BackgroundSettings extends React.PureComponent {
|
||||
<br/><br/>
|
||||
|
||||
<Dropdown label='Type' name='backgroundType' onChange={(value) => this.setState({ backgroundType: value })}>
|
||||
{this.marketplaceType()}
|
||||
<option value='api'>{background.type.api}</option>
|
||||
<option value='custom'>{background.type.custom_image}</option>
|
||||
<option value='colour'>{background.type.custom_colour}</option>
|
||||
|
||||
Reference in New Issue
Block a user