mirror of
https://github.com/mue/mue.git
synced 2026-07-09 05:34:20 +02:00
style: codacy
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user