chore: run prettier

This commit is contained in:
David Ralph 2024-01-01 11:48:30 +00:00
parent 12b46de706
commit 2ba9714cad
6 changed files with 716 additions and 718 deletions

View File

@ -66,10 +66,12 @@ class Dropdown extends PureComponent {
{this.props.manual
? this.props.children
: this.props.children.map((e, index) => {
return e && (
<MenuItem key={index} value={e.props ? e.props.value : ''}>
{e.props ? e.props.children : ''}
</MenuItem>
return (
e && (
<MenuItem key={index} value={e.props ? e.props.value : ''}>
{e.props ? e.props.children : ''}
</MenuItem>
)
);
})}
</Select>

View File

@ -64,10 +64,7 @@ class Header extends PureComponent {
)}
<span className="mainTitle">{this.props.title}</span>
{this.props.switch && (
<button
className="sideload"
onClick={() => this.changeSetting()}
>
<button className="sideload" onClick={() => this.changeSetting()}>
{this.state[this.props.setting] ? (
<>
Hide

View File

@ -63,7 +63,7 @@ export default class QuickLinks extends PureComponent {
}
data.push({
name: name || await this.getTitle(url),
name: name || (await this.getTitle(url)),
url,
icon: icon || '',
key: Math.random().toString(36).substring(7) + 1,
@ -92,7 +92,7 @@ export default class QuickLinks extends PureComponent {
async editLink(og, name, url, icon) {
const data = JSON.parse(localStorage.getItem('quicklinks'));
const dataobj = data.find((i) => i.key === og.key);
dataobj.name = name || await this.getTitle(url);
dataobj.name = name || (await this.getTitle(url));
dataobj.url = url;
dataobj.icon = icon || '';

View File

@ -419,18 +419,17 @@ export default class Background extends PureComponent {
const backgroundFilter = backgroundFilterSetting && backgroundFilterSetting !== 'none';
if (this.state.video === true) {
document.getElementById(
'backgroundVideo',
).style.webkitFilter = `blur(${localStorage.getItem(
'blur',
)}px) brightness(${localStorage.getItem('brightness')}%) ${
backgroundFilter
? backgroundFilterSetting +
'(' +
localStorage.getItem('backgroundFilterAmount') +
'%)'
: ''
}`;
document.getElementById('backgroundVideo').style.webkitFilter =
`blur(${localStorage.getItem('blur')}px) brightness(${localStorage.getItem(
'brightness',
)}%) ${
backgroundFilter
? backgroundFilterSetting +
'(' +
localStorage.getItem('backgroundFilterAmount') +
'%)'
: ''
}`;
} else {
element.style.webkitFilter = `blur(${localStorage.getItem(
'blur',

View File

@ -249,33 +249,33 @@ export default class Search extends PureComponent {
</div>
<div>
{localStorage.getItem('searchDropdown') === 'true' &&
this.state.searchDropdown === true && (
<div className="searchDropdown">
{searchEngines.map(({ name }, key) => {
return (
<span
className={
'searchDropdownList' +
(this.state.currentSearch === name ? ' searchDropdownListActive' : '')
}
onClick={() => this.setSearch(name)}
key={key}
>
{name}
</span>
);
})}
<span
className={
'searchDropdownList' +
(this.state.currentSearch === customText ? ' searchDropdownListActive' : '')
}
onClick={() => this.setSearch(customText, 'custom')}
>
{customText}
</span>
</div>
)}
this.state.searchDropdown === true && (
<div className="searchDropdown">
{searchEngines.map(({ name }, key) => {
return (
<span
className={
'searchDropdownList' +
(this.state.currentSearch === name ? ' searchDropdownListActive' : '')
}
onClick={() => this.setSearch(name)}
key={key}
>
{name}
</span>
);
})}
<span
className={
'searchDropdownList' +
(this.state.currentSearch === customText ? ' searchDropdownListActive' : '')
}
onClick={() => this.setSearch(customText, 'custom')}
>
{customText}
</span>
</div>
)}
</div>
</div>
);

File diff suppressed because it is too large Load Diff