mirror of https://github.com/mue/mue.git
style: codacy
This commit is contained in:
parent
fe4d17eff3
commit
1ac6f418bf
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
extends: 'react-app',
|
||||
parser: '@babel/eslint-parser'
|
||||
}
|
||||
};
|
||||
|
|
|
@ -29,14 +29,14 @@ export default class Added extends React.PureComponent {
|
|||
};
|
||||
this.buttons = {
|
||||
uninstall: <button className='removeFromMue' onClick={() => this.uninstall()}>{window.language.modals.main.marketplace.product.buttons.remove}</button>,
|
||||
}
|
||||
};
|
||||
this.language = window.language.modals.main.addons;
|
||||
}
|
||||
|
||||
toggle(type, data) {
|
||||
if (type === 'item') {
|
||||
const installed = JSON.parse(localStorage.getItem('installed'));
|
||||
const info = installed.find(i => i.name === data);
|
||||
const info = installed.find((i) => i.name === data);
|
||||
|
||||
this.setState({
|
||||
item: {
|
||||
|
|
|
@ -34,7 +34,7 @@ export default class Marketplace extends React.PureComponent {
|
|||
this.buttons = {
|
||||
uninstall: <button className='removeFromMue' onClick={() => this.manage('uninstall')}>{window.language.modals.main.marketplace.product.buttons.remove}</button>,
|
||||
install: <button className='addToMue' onClick={() => this.manage('install')}>{window.language.modals.main.marketplace.product.buttons.addtomue}</button>
|
||||
}
|
||||
};
|
||||
this.language = window.language.modals.main.marketplace;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ export default function Sideload() {
|
|||
const install = (input) => {
|
||||
MarketplaceFunctions.install(input.type, input);
|
||||
toast(window.language.toasts.installed);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -57,7 +57,7 @@ export default class BackgroundSettings extends React.PureComponent {
|
|||
<Checkbox name='backgroundVideoLoop' text={this.language.sections.background.source.loop_video}/>
|
||||
<Checkbox name='backgroundVideoMute' text={this.language.sections.background.source.mute_video}/>
|
||||
</>
|
||||
)
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ export default class BackgroundSettings extends React.PureComponent {
|
|||
|
||||
marketplaceType = () => {
|
||||
if (localStorage.getItem('photo_packs')) {
|
||||
return <option value='photo_pack'>{window.language.modals.main.navbar.marketplace}</option>
|
||||
return <option value='photo_pack'>{window.language.modals.main.navbar.marketplace}</option>;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ export default class Background extends React.PureComponent {
|
|||
|
||||
if (gradient.length > 1) {
|
||||
// Note: Append the gradient for additional browser support.
|
||||
const stepStyles = gradient.map(g => ` ${g.colour} ${g.stop}%`).join();
|
||||
const stepStyles = gradient.map((g) => ` ${g.colour} ${g.stop}%`).join();
|
||||
style += ` background: ${type}-gradient(${(type === 'linear' ? (`${angle}deg,`) : '')}${stepStyles})`;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ export default class Background extends React.PureComponent {
|
|||
}
|
||||
|
||||
videoCheck(url) {
|
||||
return url.startsWith('data:video/') || url.endsWith('.mp4') || url.endsWith('.webm') || url.endsWith('.ogg')
|
||||
return url.startsWith('data:video/') || url.endsWith('.mp4') || url.endsWith('.webm') || url.endsWith('.ogg');
|
||||
}
|
||||
|
||||
offlineBackground() {
|
||||
|
@ -235,7 +235,7 @@ export default class Background extends React.PureComponent {
|
|||
}
|
||||
});
|
||||
this.getBackground();
|
||||
}
|
||||
};
|
||||
|
||||
EventBus.on('refresh', (data) => {
|
||||
if (data === 'background') {
|
||||
|
|
|
@ -34,7 +34,7 @@ export default class Search extends React.PureComponent {
|
|||
setTimeout(() => {
|
||||
window.location.href = this.state.url + `?${this.state.query}=` + searchText.value;
|
||||
}, 1000);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
searchButton = () => {
|
||||
|
|
|
@ -115,7 +115,7 @@ export default class Weather extends React.PureComponent {
|
|||
return (<div className='weather'>
|
||||
<span className='loc'>{this.state.location}</span>
|
||||
</div>);
|
||||
};
|
||||
}
|
||||
|
||||
const minmax = () => {
|
||||
const mintemp = (localStorage.getItem('mintemp') === 'true');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const isValidRGBValue = (value) => {
|
||||
return (typeof (value) === 'number' && Number.isNaN(value) === false && value >= 0 && value <= 255);
|
||||
}
|
||||
};
|
||||
|
||||
export default function setRGBA(red, green, blue, alpha) {
|
||||
if (isValidRGBValue(red) && isValidRGBValue(green) && isValidRGBValue(blue)) {
|
||||
|
|
|
@ -14,7 +14,7 @@ export default class MarketplaceFunctions {
|
|||
case 'settings':
|
||||
const oldSettings = JSON.parse(localStorage.getItem('backup_settings'));
|
||||
localStorage.clear();
|
||||
oldSettings.forEach(item => localStorage.setItem(item.name, item.value));
|
||||
oldSettings.forEach((item) => localStorage.setItem(item.name, item.value));
|
||||
break;
|
||||
case 'quote_packs':
|
||||
localStorage.removeItem('quote_packs');
|
||||
|
@ -60,7 +60,7 @@ export default class MarketplaceFunctions {
|
|||
}
|
||||
|
||||
localStorage.setItem('backup_settings', JSON.stringify(oldSettings));
|
||||
input.settings.forEach(element => localStorage.setItem(element.name, element.value));
|
||||
input.settings.forEach((element) => localStorage.setItem(element.name, element.value));
|
||||
break;
|
||||
|
||||
case 'photos':
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
"title": "Digital",
|
||||
"seconds": "Sekunden",
|
||||
"twentyfourhour": "24 Stunden",
|
||||
"twelvehour": "12 hour",
|
||||
"twelvehour": "12 Stunden",
|
||||
"zero": "Nullen füllen"
|
||||
},
|
||||
"analogue": {
|
||||
|
|
Loading…
Reference in New Issue