mirror of
https://github.com/mue/mue.git
synced 2026-07-14 04:24:01 +02:00
refactor: codacy and some style changes etc
This commit is contained in:
@@ -25,7 +25,7 @@ export default class Dropdown extends PureComponent {
|
||||
window.stats.postEvent('setting', `${this.props.name} from ${this.state.value} to ${value}`);
|
||||
|
||||
this.setState({
|
||||
value: value,
|
||||
value,
|
||||
title: e.target[e.target.selectedIndex].text
|
||||
});
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ export default class Radio extends PureComponent {
|
||||
localStorage.setItem(this.props.name, value);
|
||||
|
||||
this.setState({
|
||||
value: value
|
||||
value
|
||||
});
|
||||
|
||||
window.stats.postEvent('setting', `${this.props.name} from ${this.state.value} to ${value}`);
|
||||
|
||||
@@ -36,7 +36,7 @@ export default class Slider extends PureComponent {
|
||||
|
||||
localStorage.setItem(this.props.name, value);
|
||||
this.setState({
|
||||
value: value,
|
||||
value,
|
||||
numberWidth: ((value.length + 1) * this.widthCalculation)
|
||||
});
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ export default class Text extends PureComponent {
|
||||
|
||||
localStorage.setItem(this.props.name, value);
|
||||
this.setState({
|
||||
value: value
|
||||
value
|
||||
});
|
||||
|
||||
if (this.props.element) {
|
||||
|
||||
@@ -47,17 +47,17 @@ export default class About extends PureComponent {
|
||||
|
||||
const newVersion = versionData[0].tag_name;
|
||||
|
||||
let updateMsg = this.language.version.no_update;
|
||||
let update = this.language.version.no_update;
|
||||
if (Number(window.constants.VERSION.replaceAll('.', '')) < Number(newVersion.replaceAll('.', ''))) {
|
||||
updateMsg = `${this.language.version.update_available}: ${newVersion}`;
|
||||
update = `${this.language.version.update_available}: ${newVersion}`;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
// exclude bots
|
||||
contributors: contributors.filter((contributor) => !contributor.login.includes('bot')),
|
||||
sponsors: sponsors,
|
||||
update: updateMsg,
|
||||
other_contributors: other_contributors,
|
||||
sponsors,
|
||||
update,
|
||||
other_contributors,
|
||||
photographers: photographers.sort().join(', '),
|
||||
loading: null
|
||||
});
|
||||
|
||||
@@ -32,7 +32,7 @@ export default class Changelog extends PureComponent {
|
||||
|
||||
this.setState({
|
||||
title: data.title,
|
||||
date: date,
|
||||
date,
|
||||
image: data.featured_image || null,
|
||||
author: 'By ' + data.authors.join(', '),
|
||||
html: data.html
|
||||
|
||||
Reference in New Issue
Block a user