mirror of
https://github.com/mue/mue.git
synced 2026-07-16 13:34:03 +02:00
chore: run prettier
This commit is contained in:
@@ -29,7 +29,7 @@ export default class Dropdown extends PureComponent {
|
||||
|
||||
if (!this.props.noSetting) {
|
||||
localStorage.setItem(this.props.name, value);
|
||||
localStorage.setItem(this.props.name2, this.props.value2)
|
||||
localStorage.setItem(this.props.name2, this.props.value2);
|
||||
}
|
||||
|
||||
if (this.props.onChange) {
|
||||
|
||||
@@ -45,4 +45,4 @@ function ResetModal({ modalClose }) {
|
||||
);
|
||||
}
|
||||
|
||||
export default memo(ResetModal);
|
||||
export default memo(ResetModal);
|
||||
|
||||
@@ -12,4 +12,4 @@ function SettingsItem(props) {
|
||||
);
|
||||
}
|
||||
|
||||
export default memo(SettingsItem);
|
||||
export default memo(SettingsItem);
|
||||
|
||||
@@ -22,7 +22,10 @@ function AppearanceSettings() {
|
||||
<span className="title">
|
||||
{variables.getMessage('modals.main.settings.sections.appearance.theme.title')}
|
||||
</span>
|
||||
<span className="subtitle"> {variables.getMessage('modals.main.settings.sections.appearance.theme.description')}</span>
|
||||
<span className="subtitle">
|
||||
{' '}
|
||||
{variables.getMessage('modals.main.settings.sections.appearance.theme.description')}
|
||||
</span>
|
||||
</div>
|
||||
<div className="action">
|
||||
<Radio
|
||||
@@ -50,7 +53,9 @@ function AppearanceSettings() {
|
||||
<span className="title">
|
||||
{variables.getMessage('modals.main.settings.sections.appearance.font.title')}
|
||||
</span>
|
||||
<span className="subtitle">{variables.getMessage('modals.main.settings.sections.appearance.font.description')}</span>
|
||||
<span className="subtitle">
|
||||
{variables.getMessage('modals.main.settings.sections.appearance.font.description')}
|
||||
</span>
|
||||
</div>
|
||||
<div className="action">
|
||||
<Checkbox
|
||||
@@ -124,7 +129,9 @@ function AppearanceSettings() {
|
||||
</div>
|
||||
<SettingsItem
|
||||
title={variables.getMessage('modals.main.settings.sections.appearance.style.title')}
|
||||
subtitle={variables.getMessage('modals.main.settings.sections.appearance.style.description')}
|
||||
subtitle={variables.getMessage(
|
||||
'modals.main.settings.sections.appearance.style.description',
|
||||
)}
|
||||
>
|
||||
<Radio
|
||||
name="widgetStyle"
|
||||
@@ -145,7 +152,9 @@ function AppearanceSettings() {
|
||||
|
||||
<SettingsItem
|
||||
title={variables.getMessage('modals.main.settings.sections.appearance.accessibility.title')}
|
||||
subtitle={variables.getMessage('modals.main.settings.sections.appearance.accessibility.description')}
|
||||
subtitle={variables.getMessage(
|
||||
'modals.main.settings.sections.appearance.accessibility.description',
|
||||
)}
|
||||
final={true}
|
||||
>
|
||||
<Dropdown
|
||||
@@ -155,9 +164,23 @@ function AppearanceSettings() {
|
||||
name="textBorder"
|
||||
category="other"
|
||||
>
|
||||
<option value="new">{variables.getMessage('modals.main.settings.sections.appearance.accessibility.text_shadow.new',)}</option> {/* default */}
|
||||
<option value="true">{variables.getMessage('modals.main.settings.sections.appearance.accessibility.text_shadow.old',)}</option> {/* old checkbox setting */}
|
||||
<option value="none">{variables.getMessage('modals.main.settings.sections.appearance.accessibility.text_shadow.none')}</option>
|
||||
<option value="new">
|
||||
{variables.getMessage(
|
||||
'modals.main.settings.sections.appearance.accessibility.text_shadow.new',
|
||||
)}
|
||||
</option>{' '}
|
||||
{/* default */}
|
||||
<option value="true">
|
||||
{variables.getMessage(
|
||||
'modals.main.settings.sections.appearance.accessibility.text_shadow.old',
|
||||
)}
|
||||
</option>{' '}
|
||||
{/* old checkbox setting */}
|
||||
<option value="none">
|
||||
{variables.getMessage(
|
||||
'modals.main.settings.sections.appearance.accessibility.text_shadow.none',
|
||||
)}
|
||||
</option>
|
||||
</Dropdown>
|
||||
<Checkbox
|
||||
text={variables.getMessage(
|
||||
@@ -188,4 +211,4 @@ function AppearanceSettings() {
|
||||
);
|
||||
}
|
||||
|
||||
export default memo(AppearanceSettings);
|
||||
export default memo(AppearanceSettings);
|
||||
|
||||
@@ -109,8 +109,10 @@ export default class Changelog extends PureComponent {
|
||||
return errorMessage(
|
||||
<>
|
||||
<MdOutlineWifiOff />
|
||||
<span className='title'>{variables.getMessage('modals.main.error_boundary.title')}</span>
|
||||
<span className="subtitle">{variables.getMessage('modals.main.error_boundary.message')}</span>
|
||||
<span className="title">{variables.getMessage('modals.main.error_boundary.title')}</span>
|
||||
<span className="subtitle">
|
||||
{variables.getMessage('modals.main.error_boundary.message')}
|
||||
</span>
|
||||
</>,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -71,4 +71,4 @@ function ExperimentalSettings() {
|
||||
);
|
||||
}
|
||||
|
||||
export default memo(ExperimentalSettings);
|
||||
export default memo(ExperimentalSettings);
|
||||
|
||||
@@ -95,7 +95,7 @@ export default class Message extends PureComponent {
|
||||
)}
|
||||
onChange={(e) => this.message(e, true, index)}
|
||||
varient="outlined"
|
||||
style={{ padding: "0"}}
|
||||
style={{ padding: '0' }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -117,8 +117,12 @@ export default class Message extends PureComponent {
|
||||
<div className="photosEmpty">
|
||||
<div className="emptyNewMessage">
|
||||
<MdOutlineTextsms />
|
||||
<span className="title">{variables.getMessage('modals.main.settings.sections.message.no_messages')}</span>
|
||||
<span className="subtitle">{variables.getMessage('modals.main.settings.sections.message.add_some')}</span>
|
||||
<span className="title">
|
||||
{variables.getMessage('modals.main.settings.sections.message.no_messages')}
|
||||
</span>
|
||||
<span className="subtitle">
|
||||
{variables.getMessage('modals.main.settings.sections.message.add_some')}
|
||||
</span>
|
||||
<button onClick={() => this.modifyMessage('add')}>
|
||||
{variables.getMessage('modals.main.settings.sections.message.add')}
|
||||
<MdAdd />
|
||||
|
||||
@@ -43,9 +43,9 @@ export default class OrderSettings extends PureComponent {
|
||||
date: '',
|
||||
description: '',
|
||||
link: '',
|
||||
linkText: ''
|
||||
linkText: '',
|
||||
},
|
||||
newsDone: false
|
||||
newsDone: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ export default class OrderSettings extends PureComponent {
|
||||
const data = await (await fetch('https://api.muetab.com/news')).json();
|
||||
this.setState({
|
||||
news: data.news,
|
||||
newsDone: true
|
||||
newsDone: true,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -151,11 +151,13 @@ export default class OrderSettings extends PureComponent {
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: "flex", flexFlow: "column" }}>
|
||||
<span className='title'>{this.state.news.title}</span>
|
||||
<span className='subtitle'>{this.state.news.date}</span>
|
||||
<span>{this.state.news.description}</span>
|
||||
<a className='link' href={this.state.news.link}>{this.state.news.linkText}</a>
|
||||
<div style={{ display: 'flex', flexFlow: 'column' }}>
|
||||
<span className="title">{this.state.news.title}</span>
|
||||
<span className="subtitle">{this.state.news.date}</span>
|
||||
<span>{this.state.news.description}</span>
|
||||
<a className="link" href={this.state.news.link}>
|
||||
{this.state.news.linkText}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -121,7 +121,7 @@ export default class QuoteSettings extends PureComponent {
|
||||
)}
|
||||
onChange={(e) => this.customQuote(e, true, index, 'quote')}
|
||||
varient="outlined"
|
||||
style={{ fontSize: '22px', fontWeight: 'bold'}}
|
||||
style={{ fontSize: '22px', fontWeight: 'bold' }}
|
||||
/>
|
||||
<TextareaAutosize
|
||||
value={this.state.customQuote[index].author}
|
||||
@@ -259,9 +259,7 @@ export default class QuoteSettings extends PureComponent {
|
||||
value2={Date.now()}
|
||||
>
|
||||
<option value="refresh">{variables.getMessage('tabname')}</option>
|
||||
<option value={10000}>
|
||||
10 seconds
|
||||
</option>
|
||||
<option value={10000}>10 seconds</option>
|
||||
<option value={60000}>
|
||||
{variables.getMessage('modals.main.settings.sections.background.interval.minute')}
|
||||
</option>
|
||||
|
||||
@@ -60,7 +60,7 @@ export default class TimeSettings extends PureComponent {
|
||||
|
||||
render() {
|
||||
const weatherType = localStorage.getItem('weatherType');
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<Header
|
||||
@@ -71,12 +71,27 @@ export default class TimeSettings extends PureComponent {
|
||||
zoomCategory="weather"
|
||||
switch={true}
|
||||
/>
|
||||
<SettingsItem title={variables.getMessage('modals.main.settings.sections.weather.widget_type')}>
|
||||
<Dropdown label={variables.getMessage('modals.main.settings.sections.time.type')} name="weatherType" category="weather" onChange={() => this.forceUpdate()}>
|
||||
<option value="1">{variables.getMessage('modals.main.settings.sections.weather.options.basic')}</option>
|
||||
<option value="2">{variables.getMessage('modals.main.settings.sections.weather.options.standard')}</option>
|
||||
<option value="3">{variables.getMessage('modals.main.settings.sections.weather.options.expanded')}</option>
|
||||
<option value="4">{variables.getMessage('modals.main.settings.sections.weather.options.custom')}</option>
|
||||
<SettingsItem
|
||||
title={variables.getMessage('modals.main.settings.sections.weather.widget_type')}
|
||||
>
|
||||
<Dropdown
|
||||
label={variables.getMessage('modals.main.settings.sections.time.type')}
|
||||
name="weatherType"
|
||||
category="weather"
|
||||
onChange={() => this.forceUpdate()}
|
||||
>
|
||||
<option value="1">
|
||||
{variables.getMessage('modals.main.settings.sections.weather.options.basic')}
|
||||
</option>
|
||||
<option value="2">
|
||||
{variables.getMessage('modals.main.settings.sections.weather.options.standard')}
|
||||
</option>
|
||||
<option value="3">
|
||||
{variables.getMessage('modals.main.settings.sections.weather.options.expanded')}
|
||||
</option>
|
||||
<option value="4">
|
||||
{variables.getMessage('modals.main.settings.sections.weather.options.custom')}
|
||||
</option>
|
||||
</Dropdown>
|
||||
</SettingsItem>
|
||||
<SettingsItem
|
||||
@@ -126,9 +141,10 @@ export default class TimeSettings extends PureComponent {
|
||||
/>
|
||||
</SettingsItem>
|
||||
{weatherType === '4' && (
|
||||
<SettingsItem title={variables.getMessage(
|
||||
'modals.main.settings.sections.weather.custom_settings',
|
||||
)} final={true}>
|
||||
<SettingsItem
|
||||
title={variables.getMessage('modals.main.settings.sections.weather.custom_settings')}
|
||||
final={true}
|
||||
>
|
||||
<Checkbox
|
||||
name="weatherdescription"
|
||||
text={variables.getMessage(
|
||||
|
||||
@@ -15,7 +15,7 @@ import { videoCheck } from 'modules/helpers/background/widget';
|
||||
|
||||
import Checkbox from '../../Checkbox';
|
||||
import FileUpload from '../../FileUpload';
|
||||
import Tooltip from '../../../../../helpers/tooltip/Tooltip'
|
||||
import Tooltip from '../../../../../helpers/tooltip/Tooltip';
|
||||
|
||||
import Modal from 'react-modal';
|
||||
|
||||
|
||||
@@ -40,4 +40,4 @@ function CustomURLModal({ modalClose, modalCloseOnly }) {
|
||||
);
|
||||
}
|
||||
|
||||
export default memo(CustomURLModal);
|
||||
export default memo(CustomURLModal);
|
||||
|
||||
@@ -5,14 +5,14 @@ function ClockSkeleton() {
|
||||
if (localStorage.getItem('timeType') === 'analogue') {
|
||||
return (
|
||||
<Suspense fallback={<></>}>
|
||||
<div className="clockBackground">
|
||||
<Analog
|
||||
className="analogclock clock-container"
|
||||
value={'2022-10-07T17:00:00+00:00'}
|
||||
size={50}
|
||||
/>
|
||||
</div>
|
||||
</Suspense>
|
||||
<div className="clockBackground">
|
||||
<Analog
|
||||
className="analogclock clock-container"
|
||||
value={'2022-10-07T17:00:00+00:00'}
|
||||
size={50}
|
||||
/>
|
||||
</div>
|
||||
</Suspense>
|
||||
);
|
||||
} else if (localStorage.getItem('timeType') === 'percentageComplete') {
|
||||
return <span className="new-clock clock-container clockSkeleton">68%</span>;
|
||||
@@ -28,4 +28,4 @@ function ClockSkeleton() {
|
||||
}
|
||||
}
|
||||
|
||||
export default memo(ClockSkeleton);
|
||||
export default memo(ClockSkeleton);
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import { memo } from 'react';
|
||||
|
||||
function DateSkeleton() {
|
||||
return (
|
||||
<span className="date">
|
||||
Thursday January 1st
|
||||
</span>
|
||||
);
|
||||
return <span className="date">Thursday January 1st</span>;
|
||||
}
|
||||
|
||||
export default memo(DateSkeleton);
|
||||
export default memo(DateSkeleton);
|
||||
|
||||
@@ -4,4 +4,4 @@ function GreetingSkeleton() {
|
||||
return <span className="greeting">Good Morning</span>;
|
||||
}
|
||||
|
||||
export default memo(GreetingSkeleton);
|
||||
export default memo(GreetingSkeleton);
|
||||
|
||||
@@ -11,4 +11,4 @@ function MessageSkeleton() {
|
||||
);
|
||||
}
|
||||
|
||||
export default memo(MessageSkeleton);
|
||||
export default memo(MessageSkeleton);
|
||||
|
||||
@@ -23,4 +23,4 @@ function QuicklinksSkeleton() {
|
||||
);
|
||||
}
|
||||
|
||||
export default memo(QuicklinksSkeleton);
|
||||
export default memo(QuicklinksSkeleton);
|
||||
|
||||
@@ -18,4 +18,4 @@ function QuoteSkeleton() {
|
||||
);
|
||||
}
|
||||
|
||||
export default memo(QuoteSkeleton);
|
||||
export default memo(QuoteSkeleton);
|
||||
|
||||
@@ -56,4 +56,4 @@ function AddModal({ urlError, addLink, closeModal, edit, editData, editLink }) {
|
||||
);
|
||||
}
|
||||
|
||||
export default memo(AddModal);
|
||||
export default memo(AddModal);
|
||||
|
||||
Reference in New Issue
Block a user