fix: upgrading from 5.0.1 to latest now works, code style changes etc

This commit is contained in:
David Ralph
2021-06-20 13:09:41 +01:00
parent 796896571d
commit dc442ef917
9 changed files with 30 additions and 26 deletions

View File

@@ -28,11 +28,12 @@ export default class About extends React.PureComponent {
let contributors, sponsors, photographers, versionData;
try {
versionData = await (await fetch(window.constants.GITHUB_URL + '/repos/mue/mue/releases', { signal: this.controller.signal })).json();
contributors = await (await fetch(window.constants.GITHUB_URL + '/repos/mue/mue/contributors', { signal: this.controller.signal })).json();
sponsors = (await (await fetch(window.constants.SPONSORS_URL + '/list', { signal: this.controller.signal })).json()).sponsors;
photographers = await (await fetch(window.constants.API_URL + '/images/photographers', { signal: this.controller.signal })).json();
versionData = await (await fetch(window.constants.GITHUB_URL + '/repos/mue/mue/releases', { signal: this.controller.signal })).json();
} catch (e) {
if (this.controller.signal.aborted === true) {
return;

View File

@@ -11,16 +11,16 @@ export default function AppearanceSettings() {
const themeOptions = [
{
'name': appearance.theme.auto,
'value': 'auto'
name: appearance.theme.auto,
value: 'auto'
},
{
'name': appearance.theme.light,
'value': 'light'
name: appearance.theme.light,
value: 'light'
},
{
'name': appearance.theme.dark,
'value': 'dark'
name: appearance.theme.dark,
value: 'dark'
}
];

View File

@@ -27,7 +27,9 @@ export default class Changelog extends React.PureComponent {
let date = new Date(data.date);
date = date.toLocaleDateString(window.languagecode.replace('_', '-'), {
year: 'numeric', month: 'long', day: 'numeric'
year: 'numeric',
month: 'long',
day: 'numeric'
});
this.setState({

View File

@@ -23,12 +23,12 @@ export default class TimeSettings extends React.PureComponent {
const digitalOptions = [
{
'name': time.digital.twentyfourhour,
'value': 'twentyfourhour'
name: time.digital.twentyfourhour,
value: 'twentyfourhour'
},
{
'name': time.digital.twelvehour,
'value': 'twelvehour'
name: time.digital.twelvehour,
value: 'twelvehour'
}
];

View File

@@ -49,16 +49,16 @@ export default class TimeSettings extends React.PureComponent {
const tempFormat = [
{
'name': language.temp_format.celsius + ' (°C)',
'value': 'celsius'
name: language.temp_format.celsius + ' (°C)',
value: 'celsius'
},
{
'name': language.temp_format.fahrenheit + ' (°F)',
'value': 'fahrenheit'
name: language.temp_format.fahrenheit + ' (°F)',
value: 'fahrenheit'
},
{
'name': language.temp_format.kelvin + ' (K)',
'value': 'kelvin'
name: language.temp_format.kelvin + ' (K)',
value: 'kelvin'
}
];