mirror of https://github.com/mue/mue.git
refactor: remove lots of unused/unfinished code, change vite to mjs
This commit is contained in:
parent
3a2cbb377f
commit
96f16352a6
|
@ -25,7 +25,6 @@
|
|||
"embla-carousel-react": "8.0.0-rc18",
|
||||
"fast-blurhash": "^1.1.2",
|
||||
"image-conversion": "^2.1.1",
|
||||
"prop-types": "^15.8.1",
|
||||
"react": "^18.2.0",
|
||||
"react-clock": "4.6.0",
|
||||
"react-dom": "^18.2.0",
|
||||
|
|
|
@ -47,9 +47,6 @@ dependencies:
|
|||
image-conversion:
|
||||
specifier: ^2.1.1
|
||||
version: 2.1.1
|
||||
prop-types:
|
||||
specifier: ^15.8.1
|
||||
version: 15.8.1
|
||||
react:
|
||||
specifier: ^18.2.0
|
||||
version: 18.2.0
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import EventBus from 'modules/helpers/eventbus';
|
||||
|
||||
|
@ -93,11 +92,4 @@ class Autocomplete extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
Autocomplete.propTypes = {
|
||||
suggestions: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
onClick: PropTypes.func.isRequired,
|
||||
placeholder: PropTypes.string,
|
||||
};
|
||||
|
||||
export default Autocomplete;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React, { useState, useEffect, useCallback, useRef, memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { MdOutlineArrowForwardIos, MdOutlineArrowBackIos } from 'react-icons/md';
|
||||
import useEmblaCarousel from 'embla-carousel-react';
|
||||
import Autoplay from 'embla-carousel-autoplay';
|
||||
|
@ -78,8 +77,4 @@ function EmblaCarousel({ data }) {
|
|||
);
|
||||
}
|
||||
|
||||
EmblaCarousel.propTypes = {
|
||||
data: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
};
|
||||
|
||||
export default memo(EmblaCarousel);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import variables from 'modules/variables';
|
||||
import './preview.scss';
|
||||
|
||||
|
@ -15,8 +14,4 @@ function Preview(props) {
|
|||
);
|
||||
}
|
||||
|
||||
Preview.propTypes = {
|
||||
setup: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default memo(Preview);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import variables from 'modules/variables';
|
||||
import { MdClose, MdEmail, MdContentCopy } from 'react-icons/md';
|
||||
import { FaTwitter, FaFacebookF } from 'react-icons/fa';
|
||||
|
@ -124,9 +123,4 @@ function ShareModal({ modalClose, data }) {
|
|||
);
|
||||
}
|
||||
|
||||
ShareModal.propTypes = {
|
||||
modalClose: PropTypes.func.isRequired,
|
||||
data: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default memo(ShareModal);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { useState, memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useFloating, flip, offset, shift } from '@floating-ui/react-dom';
|
||||
import './tooltip.scss';
|
||||
|
||||
|
@ -48,12 +47,4 @@ function Tooltip({ children, title, style, placement, subtitle }) {
|
|||
);
|
||||
}
|
||||
|
||||
Tooltip.propTypes = {
|
||||
children: PropTypes.node.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
style: PropTypes.object,
|
||||
placement: PropTypes.string,
|
||||
subtitle: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default memo(Tooltip);
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
import variables from 'modules/variables';
|
||||
import { useState, memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useFloating, flip, offset, shift } from '@floating-ui/react-dom';
|
||||
import { MdClose, MdInfo, MdOpenInNew } from 'react-icons/md';
|
||||
import Tooltip from './Tooltip';
|
||||
|
||||
import './tooltip.scss';
|
||||
|
||||
function InfoTooltip({ title, style, placement, subtitle }) {
|
||||
const [showTooltip, setShowTooltip] = useState(false);
|
||||
const [reference, setReference] = useState(null);
|
||||
const { x, y, refs, strategy } = useFloating({
|
||||
placement: placement || 'top-start',
|
||||
middleware: [flip(), offset(10), shift()],
|
||||
elements: {
|
||||
reference,
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="infoTooltip" style={style} ref={setReference}>
|
||||
<MdInfo onClick={() => setShowTooltip(true)} />
|
||||
{showTooltip && (
|
||||
<div
|
||||
ref={refs.setFloating}
|
||||
style={{
|
||||
position: strategy,
|
||||
top: y ?? '',
|
||||
left: x ?? '',
|
||||
}}
|
||||
className="infoTooltipTitle"
|
||||
>
|
||||
<div className="tooltipHeader">
|
||||
<span className="title">{title}</span>
|
||||
<Tooltip title={variables.getMessage('modals.welcome.buttons.close')}>
|
||||
<div className="close" onClick={() => setShowTooltip(false)}>
|
||||
<MdClose />
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
<span className="subtitle">{subtitle}</span>
|
||||
<span className="link">
|
||||
{variables.getMessage('modals.main.settings.open_knowledgebase')} <MdOpenInNew />
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
InfoTooltip.propTypes = {
|
||||
title: PropTypes.string.isRequired,
|
||||
style: PropTypes.object,
|
||||
placement: PropTypes.string,
|
||||
subtitle: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default memo(InfoTooltip);
|
|
@ -96,52 +96,3 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.infoTooltipTitle {
|
||||
min-width: 200px;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
cursor: initial;
|
||||
user-select: none;
|
||||
opacity: 1;
|
||||
text-align: left;
|
||||
padding: 25px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-flow: column;
|
||||
gap: 10px;
|
||||
|
||||
@include themed {
|
||||
background-color: t($modal-background);
|
||||
border-radius: t($borderRadius);
|
||||
box-shadow: 0 0 0 1px t($modal-sidebarActive);
|
||||
}
|
||||
|
||||
.tooltipHeader {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
align-items: center;
|
||||
gap: 25px;
|
||||
}
|
||||
|
||||
.link {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.close {
|
||||
font-size: 20px;
|
||||
padding: 15px;
|
||||
place-items: center;
|
||||
display: grid;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
@include themed {
|
||||
background: t($modal-sidebar);
|
||||
border-radius: t($borderRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { MdErrorOutline } from 'react-icons/md';
|
||||
import { captureException } from '@sentry/react';
|
||||
|
@ -71,8 +70,4 @@ class ErrorBoundary extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
ErrorBoundary.propTypes = {
|
||||
children: PropTypes.node.isRequired,
|
||||
};
|
||||
|
||||
export default ErrorBoundary;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { Suspense, lazy, useState, memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { MdClose } from 'react-icons/md';
|
||||
|
||||
|
@ -69,8 +68,4 @@ function MainModal({ modalClose }) {
|
|||
);
|
||||
}
|
||||
|
||||
MainModal.propTypes = {
|
||||
modalClose: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default memo(MainModal);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent, Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Tooltip from 'components/helpers/tooltip/Tooltip';
|
||||
import ImageCarousel from 'components/helpers/carousel/Carousel';
|
||||
import { toast } from 'react-toastify';
|
||||
|
@ -335,11 +334,4 @@ class Item extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
Item.propTypes = {
|
||||
data: PropTypes.object,
|
||||
addonInstalled: PropTypes.bool,
|
||||
addonInstalledVersion: PropTypes.string,
|
||||
toggleFunction: PropTypes.func,
|
||||
};
|
||||
|
||||
export default Item;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import React, { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { MdAutoFixHigh, MdOutlineArrowForward, MdOutlineOpenInNew } from 'react-icons/md';
|
||||
|
||||
function Items({
|
||||
|
@ -113,14 +112,4 @@ function Items({
|
|||
);
|
||||
}
|
||||
|
||||
Items.propTypes = {
|
||||
type: PropTypes.string.isRequired,
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
collection: PropTypes.object,
|
||||
toggleFunction: PropTypes.func.isRequired,
|
||||
collectionFunction: PropTypes.func.isRequired,
|
||||
onCollection: PropTypes.bool.isRequired,
|
||||
filter: PropTypes.string,
|
||||
};
|
||||
|
||||
export default memo(Items);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import variables from 'modules/variables';
|
||||
|
||||
function Lightbox({ modalClose, img }) {
|
||||
|
@ -15,9 +14,4 @@ function Lightbox({ modalClose, img }) {
|
|||
);
|
||||
}
|
||||
|
||||
Lightbox.propTypes = {
|
||||
modalClose: PropTypes.func.isRequired,
|
||||
img: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default memo(Lightbox);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import variables from 'modules/variables';
|
||||
import { MdClose } from 'react-icons/md';
|
||||
import Tooltip from 'components/helpers/tooltip/Tooltip';
|
||||
|
@ -23,9 +22,4 @@ function SideloadFailedModal({ modalClose, reason }) {
|
|||
);
|
||||
}
|
||||
|
||||
SideloadFailedModal.propTypes = {
|
||||
modalClose: PropTypes.func.isRequired,
|
||||
reason: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default memo(SideloadFailedModal);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { toast } from 'react-toastify';
|
||||
import {
|
||||
MdWifiOff,
|
||||
|
@ -451,8 +450,4 @@ class Marketplace extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
Marketplace.propTypes = {
|
||||
type: PropTypes.string,
|
||||
};
|
||||
|
||||
export default Marketplace;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// this file is too long
|
||||
@import 'modules/item';
|
||||
@import 'modules/buttons';
|
||||
@import 'modules/featured';
|
||||
@import 'modules/lightbox';
|
||||
@import 'scss/variables';
|
||||
|
||||
|
@ -184,64 +183,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
flex-wrap: wrap;
|
||||
gap: 15px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tag {
|
||||
padding: 2px 10px;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
|
||||
@include themed {
|
||||
background: t($modal-sidebar);
|
||||
box-shadow: 0 0 0 3px t($modal-sidebarActive);
|
||||
|
||||
span {
|
||||
&::before {
|
||||
content: '#';
|
||||
color: t($subColor);
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: t($modal-sidebarActive);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.moreTag {
|
||||
padding: 2px 10px;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
|
||||
@include themed {
|
||||
background: t($modal-sidebar);
|
||||
box-shadow: 0 0 0 3px t($modal-sidebarActive);
|
||||
|
||||
span {
|
||||
&::before {
|
||||
content: '+';
|
||||
color: t($subColor);
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: t($modal-sidebarActive);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.emptyItems {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
@ -355,35 +296,6 @@ p.author {
|
|||
}
|
||||
}
|
||||
|
||||
.itemWarning {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
@include themed {
|
||||
background: t($modal-sidebar);
|
||||
box-shadow: 0 0 0 4px t($modal-sidebarActive);
|
||||
border-radius: t($borderRadius);
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.topRow {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
text-align: justify;
|
||||
}
|
||||
}
|
||||
|
||||
.truncate {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.filter {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
|
@ -529,31 +441,6 @@ a.collectionButton {
|
|||
}
|
||||
}
|
||||
|
||||
.smallBanner {
|
||||
button {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 15px;
|
||||
margin-top: 15px;
|
||||
align-items: center;
|
||||
|
||||
@include themed {
|
||||
box-shadow: 0 0 0 4px t($modal-sidebarActive);
|
||||
border-radius: t($borderRadius);
|
||||
background: t($modal-sidebar);
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
gap: 15px;
|
||||
max-width: 250px;
|
||||
}
|
||||
}
|
||||
|
||||
.marketplaceRefresh {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
.featured {
|
||||
border-radius: 15px;
|
||||
padding: 50px;
|
||||
color: #fff;
|
||||
width: calc(100% - 6rem);
|
||||
margin-top: 13px;
|
||||
|
||||
button {
|
||||
float: left;
|
||||
margin-top: -7px;
|
||||
border: 2px solid map-get($theme-colours, 'main');
|
||||
color: map-get($theme-colours, 'main');
|
||||
|
||||
&:hover {
|
||||
background: map-get($theme-colours, 'main');
|
||||
color: #2d3436;
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-top: -20px;
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
|
@ -8,11 +8,6 @@ p.description {
|
|||
max-width: 800px;
|
||||
}
|
||||
|
||||
.informationContainer {
|
||||
margin-top: 150px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.moreInfo {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
@ -63,35 +58,6 @@ p.description {
|
|||
}
|
||||
}
|
||||
|
||||
.itemTitle {
|
||||
font-size: 38px;
|
||||
font-weight: 600;
|
||||
|
||||
@include themed {
|
||||
color: t($color);
|
||||
}
|
||||
}
|
||||
|
||||
.titleTop {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
transition: 0.5s;
|
||||
cursor: pointer;
|
||||
|
||||
@include themed {
|
||||
&:hover {
|
||||
color: t($subColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.showMoreItems {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@import 'modules/resetmodal';
|
||||
@import 'scss/variables';
|
||||
|
||||
@import 'modules/material-ui';
|
||||
@import 'modules/tabs/about';
|
||||
@import 'modules/tabs/changelog';
|
||||
|
@ -164,46 +164,6 @@ h4 {
|
|||
}
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
padding-top: 20px;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
|
||||
.settingsReturn {
|
||||
border-radius: 12px;
|
||||
cursor: pointer;
|
||||
padding: 4px;
|
||||
|
||||
svg {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: rgb(121 121 121 / 22.6%);
|
||||
}
|
||||
}
|
||||
|
||||
.returnButton {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 12px;
|
||||
cursor: pointer;
|
||||
margin-right: 25px;
|
||||
|
||||
svg {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: rgb(121 121 121 / 22.6%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.achievements {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Checkbox as CheckboxUI, FormControlLabel } from '@mui/material';
|
||||
|
||||
import EventBus from 'modules/helpers/eventbus';
|
||||
|
@ -59,13 +58,4 @@ class Checkbox extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
Checkbox.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
text: PropTypes.string.isRequired,
|
||||
category: PropTypes.string,
|
||||
element: PropTypes.string,
|
||||
onChange: PropTypes.func,
|
||||
disabled: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default Checkbox;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { useState, memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import Box from '@mui/material/Box';
|
||||
import OutlinedInput from '@mui/material/OutlinedInput';
|
||||
|
@ -55,10 +54,4 @@ function ChipSelect({ label, options, name }) {
|
|||
);
|
||||
}
|
||||
|
||||
ChipSelect.propTypes = {
|
||||
label: PropTypes.string,
|
||||
options: PropTypes.array,
|
||||
name: PropTypes.string,
|
||||
};
|
||||
|
||||
export default memo(ChipSelect);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent, createRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { InputLabel, MenuItem, FormControl, Select } from '@mui/material';
|
||||
|
||||
import EventBus from 'modules/helpers/eventbus';
|
||||
|
@ -80,16 +79,4 @@ class Dropdown extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
Dropdown.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
label: PropTypes.string,
|
||||
category: PropTypes.string,
|
||||
element: PropTypes.string,
|
||||
onChange: PropTypes.func,
|
||||
noSetting: PropTypes.bool,
|
||||
manual: PropTypes.bool,
|
||||
value2: PropTypes.string,
|
||||
name2: PropTypes.string,
|
||||
};
|
||||
|
||||
export default Dropdown;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { toast } from 'react-toastify';
|
||||
import { compressAccurately, filetoDataURL } from 'image-conversion';
|
||||
import { videoCheck } from 'modules/helpers/background/widget';
|
||||
|
@ -63,11 +62,4 @@ class FileUpload extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
FileUpload.propTypes = {
|
||||
id: PropTypes.string.isRequired,
|
||||
type: PropTypes.string.isRequired,
|
||||
loadFunction: PropTypes.func.isRequired,
|
||||
accept: PropTypes.string,
|
||||
};
|
||||
|
||||
export default FileUpload;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import variables from 'modules/variables';
|
||||
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {
|
||||
/*MdHelpOutline,*/ MdFlag,
|
||||
MdArrowBack,
|
||||
|
@ -115,16 +114,4 @@ class Header extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
Header.propTypes = {
|
||||
title: PropTypes.string.isRequired,
|
||||
setting: PropTypes.string.isRequired,
|
||||
category: PropTypes.string.isRequired,
|
||||
element: PropTypes.string,
|
||||
backButton: PropTypes.bool,
|
||||
clickEffect: PropTypes.func,
|
||||
switch: PropTypes.bool,
|
||||
zoomSetting: PropTypes.string,
|
||||
zoomCategory: PropTypes.string,
|
||||
};
|
||||
|
||||
export default Header;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {
|
||||
Radio as RadioUI,
|
||||
RadioGroup,
|
||||
|
@ -85,19 +84,4 @@ class Radio extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
Radio.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
options: PropTypes.arrayOf(
|
||||
PropTypes.shape({
|
||||
name: PropTypes.string.isRequired,
|
||||
value: PropTypes.string.isRequired,
|
||||
}),
|
||||
).isRequired,
|
||||
onChange: PropTypes.func,
|
||||
category: PropTypes.string,
|
||||
element: PropTypes.string,
|
||||
smallTitle: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default Radio;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import variables from 'modules/variables';
|
||||
import { MdClose, MdRestartAlt } from 'react-icons/md';
|
||||
import { setDefaultSettings } from 'modules/helpers/settings';
|
||||
|
@ -46,8 +45,4 @@ function ResetModal({ modalClose }) {
|
|||
);
|
||||
}
|
||||
|
||||
ResetModal.propTypes = {
|
||||
modalClose: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default memo(ResetModal);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function SettingsItem({ final, title, subtitle, children }) {
|
||||
return (
|
||||
|
@ -13,11 +12,4 @@ function SettingsItem({ final, title, subtitle, children }) {
|
|||
);
|
||||
}
|
||||
|
||||
SettingsItem.propTypes = {
|
||||
title: PropTypes.string.isRequired,
|
||||
subtitle: PropTypes.string.isRequired,
|
||||
children: PropTypes.node.isRequired,
|
||||
final: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default memo(SettingsItem);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { toast } from 'react-toastify';
|
||||
import { Slider } from '@mui/material';
|
||||
import { MdRefresh } from 'react-icons/md';
|
||||
|
@ -86,16 +85,4 @@ class SliderComponent extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
SliderComponent.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
default: PropTypes.number.isRequired,
|
||||
min: PropTypes.number.isRequired,
|
||||
max: PropTypes.number.isRequired,
|
||||
step: PropTypes.number,
|
||||
marks: PropTypes.array,
|
||||
element: PropTypes.string,
|
||||
category: PropTypes.string,
|
||||
};
|
||||
|
||||
export default SliderComponent;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Switch as SwitchUI, FormControlLabel } from '@mui/material';
|
||||
|
||||
import EventBus from 'modules/helpers/eventbus';
|
||||
|
@ -54,12 +53,4 @@ class Switch extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
Switch.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
text: PropTypes.string.isRequired,
|
||||
category: PropTypes.string,
|
||||
element: PropTypes.string,
|
||||
header: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default Switch;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { toast } from 'react-toastify';
|
||||
import { TextField } from '@mui/material';
|
||||
|
||||
|
@ -79,15 +78,4 @@ class Text extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
Text.propTypes = {
|
||||
title: PropTypes.string.isRequired,
|
||||
name: PropTypes.string.isRequired,
|
||||
category: PropTypes.string.isRequired,
|
||||
default: PropTypes.string,
|
||||
element: PropTypes.string,
|
||||
customcss: PropTypes.bool,
|
||||
textarea: PropTypes.bool,
|
||||
upperCaseFirst: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default Text;
|
||||
|
|
|
@ -102,7 +102,7 @@ export default class AdvancedSettings extends PureComponent {
|
|||
'modals.main.settings.sections.advanced.custom_css_subtitle',
|
||||
)}
|
||||
>
|
||||
<Text name="customcss" textarea={true} category="other" />
|
||||
<Text name="customcss" textarea={true} category="other" customcss={true} />
|
||||
</SettingsItem>
|
||||
<SettingsItem
|
||||
title={variables.getMessage('modals.main.settings.sections.experimental.title')}
|
||||
|
|
|
@ -1,161 +0,0 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import Modal from 'react-modal';
|
||||
import { MenuItem } from '@mui/material';
|
||||
import {
|
||||
MdUpload as ImportIcon,
|
||||
MdDownload as ExportIcon,
|
||||
MdRestartAlt as ResetIcon,
|
||||
/* MdDataUsage, */
|
||||
/* MdOutlineKeyboardArrowRight, */
|
||||
} from 'react-icons/md';
|
||||
|
||||
import { exportSettings, importSettings } from 'modules/helpers/settings/modals';
|
||||
|
||||
import FileUpload from '../../FileUpload';
|
||||
import Text from '../../Text';
|
||||
import Switch from '../../Switch';
|
||||
import ResetModal from '../../ResetModal';
|
||||
import Dropdown from '../../Dropdown';
|
||||
import SettingsItem from '../../SettingsItem';
|
||||
|
||||
//import Data from './Data';
|
||||
|
||||
import time_zones from 'components/widgets/time/timezones.json';
|
||||
|
||||
export default class AdvancedSettings extends PureComponent {
|
||||
constructor() {
|
||||
super();
|
||||
this.state = {
|
||||
resetModal: false,
|
||||
showData: false,
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
/*if (this.state.showData) {
|
||||
return <Data goBack={() => this.setState({ showData: false })} />;
|
||||
}*/
|
||||
|
||||
return (
|
||||
<>
|
||||
<span className="mainTitle">
|
||||
{variables.getMessage('modals.main.settings.sections.advanced.title')}
|
||||
</span>
|
||||
{/* {localStorage.getItem('welcomePreview') !== 'true' ? (
|
||||
<div className="moreSettings" onClick={() => this.setState({ showData: true })}>
|
||||
<div className="left">
|
||||
<MdDataUsage />
|
||||
<div className="content">
|
||||
<span className="title">
|
||||
{variables.getMessage('modals.main.settings.sections.advanced.data')}
|
||||
</span>
|
||||
<span className="subtitle">
|
||||
Sync, export, import etc your data. You have control, this is Mue.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="action">
|
||||
{' '}
|
||||
<MdOutlineKeyboardArrowRight />
|
||||
</div>
|
||||
</div>
|
||||
) : null} */}
|
||||
<SettingsItem
|
||||
title={variables.getMessage('modals.main.settings.sections.advanced.offline_mode')}
|
||||
subtitle={variables.getMessage('modals.main.settings.sections.advanced.offline_subtitle')}
|
||||
>
|
||||
<Switch name="offlineMode" element=".other" />
|
||||
</SettingsItem>
|
||||
{localStorage.getItem('welcomePreview') !== 'true' && (
|
||||
<div className="settingsRow">
|
||||
<div className="content">
|
||||
<span className="title">
|
||||
{variables.getMessage('modals.main.settings.sections.advanced.data')}
|
||||
</span>
|
||||
<span className="subtitle">
|
||||
{variables.getMessage('modals.main.settings.sections.advanced.data_subtitle')}
|
||||
</span>
|
||||
</div>
|
||||
<div className="action activityButtons">
|
||||
<button onClick={() => this.setState({ resetModal: true })}>
|
||||
{variables.getMessage('modals.main.settings.buttons.reset')}
|
||||
<ResetIcon />
|
||||
</button>
|
||||
<button onClick={() => exportSettings()}>
|
||||
{variables.getMessage('modals.main.settings.buttons.export')}
|
||||
<ExportIcon />
|
||||
</button>
|
||||
<button onClick={() => document.getElementById('file-input').click()}>
|
||||
{variables.getMessage('modals.main.settings.buttons.import')}
|
||||
<ImportIcon />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<SettingsItem
|
||||
title={variables.getMessage('modals.main.settings.sections.advanced.timezone.title')}
|
||||
subtitle={variables.getMessage(
|
||||
'modals.main.settings.sections.advanced.timezone.subtitle',
|
||||
)}
|
||||
>
|
||||
<Dropdown name="timezone" category="timezone" manual={true}>
|
||||
<MenuItem value="auto">
|
||||
{variables.getMessage('modals.main.settings.sections.advanced.timezone.automatic')}
|
||||
</MenuItem>
|
||||
{time_zones.map((timezone) => (
|
||||
<MenuItem value={timezone} key={timezone}>
|
||||
{timezone}
|
||||
</MenuItem>
|
||||
))}
|
||||
</Dropdown>
|
||||
</SettingsItem>
|
||||
<SettingsItem
|
||||
title={variables.getMessage('modals.main.settings.sections.advanced.tab_name')}
|
||||
subtitle={variables.getMessage(
|
||||
'modals.main.settings.sections.advanced.tab_name_subtitle',
|
||||
)}
|
||||
>
|
||||
<Text name="tabName" default={variables.getMessage('tabname')} category="other" />
|
||||
</SettingsItem>
|
||||
<FileUpload
|
||||
id="file-input"
|
||||
accept="application/json"
|
||||
type="settings"
|
||||
loadFunction={(e) => importSettings(e)}
|
||||
/>
|
||||
<SettingsItem
|
||||
title={variables.getMessage('modals.main.settings.sections.advanced.custom_css')}
|
||||
subtitle={variables.getMessage(
|
||||
'modals.main.settings.sections.advanced.custom_css_subtitle',
|
||||
)}
|
||||
>
|
||||
<Text name="customcss" textarea={true} category="other" customcss={true} />
|
||||
</SettingsItem>
|
||||
<SettingsItem
|
||||
title={variables.getMessage('modals.main.settings.sections.experimental.title')}
|
||||
subtitle={variables.getMessage(
|
||||
'modals.main.settings.sections.advanced.experimental_warning',
|
||||
)}
|
||||
final={true}
|
||||
>
|
||||
<Switch
|
||||
name="experimental"
|
||||
text={variables.getMessage('modals.main.settings.enabled')}
|
||||
element=".other"
|
||||
/>
|
||||
</SettingsItem>
|
||||
<Modal
|
||||
closeTimeoutMS={100}
|
||||
onRequestClose={() => this.setState({ resetModal: false })}
|
||||
isOpen={this.state.resetModal}
|
||||
className="Modal resetmodal mainModal"
|
||||
overlayClassName="Overlay resetoverlay"
|
||||
ariaHideApp={false}
|
||||
>
|
||||
<ResetModal modalClose={() => this.setState({ resetModal: false })} />
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
import variables from 'modules/variables';
|
||||
import SettingsItem from '../../SettingsItem';
|
||||
import { PureComponent } from 'react';
|
||||
import {
|
||||
MdOutlineKeyboardArrowRight,
|
||||
MdUpload as ImportIcon,
|
||||
MdDownload as ExportIcon,
|
||||
MdRestartAlt as ResetIcon,
|
||||
MdOutlineSync,
|
||||
} from 'react-icons/md';
|
||||
|
||||
export default class Data extends PureComponent {
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<span className="mainTitle" onClick={() => this.props.goBack()}>
|
||||
{variables.getMessage('modals.main.settings.sections.advanced.title')}
|
||||
<MdOutlineKeyboardArrowRight /> Data
|
||||
</span>
|
||||
<div
|
||||
className="moreSettings"
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexFlow: 'column',
|
||||
alignItems: 'center',
|
||||
gap: '10px',
|
||||
padding: '30px',
|
||||
}}
|
||||
>
|
||||
<MdOutlineSync />
|
||||
<span className="title">Sync</span>
|
||||
{/*<span className='subtitle'>Last synced at: Sun 10:12PM, 1st May 2022</span>*/}
|
||||
<span className="subtitle">Sync is not setup yet.</span>
|
||||
</div>
|
||||
<div className="settingsRow">
|
||||
<div className="content">
|
||||
<span className="title">
|
||||
{variables.getMessage('modals.main.settings.sections.advanced.data')}
|
||||
</span>
|
||||
<span className="subtitle">
|
||||
Choose whether to export your Mue settings to your computer, import an existing
|
||||
settings file, or reset your settings to their default values.
|
||||
</span>
|
||||
</div>
|
||||
<div className="action activityButtons">
|
||||
<button>
|
||||
{variables.getMessage('modals.main.settings.buttons.reset')}
|
||||
<ResetIcon />
|
||||
</button>
|
||||
<button>
|
||||
{variables.getMessage('modals.main.settings.buttons.export')}
|
||||
<ExportIcon />
|
||||
</button>
|
||||
<button>
|
||||
{variables.getMessage('modals.main.settings.buttons.import')}
|
||||
<ImportIcon />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<SettingsItem title="Sync" subtitle="Setup sync to sync lol"></SettingsItem>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { useState, memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { MdClose, MdOutlineAddLink } from 'react-icons/md';
|
||||
import Tooltip from 'components/helpers/tooltip/Tooltip';
|
||||
|
||||
|
@ -42,10 +41,4 @@ function CustomURLModal({ modalClose, urlError, modalCloseOnly }) {
|
|||
);
|
||||
}
|
||||
|
||||
CustomURLModal.propTypes = {
|
||||
modalClose: PropTypes.func.isRequired,
|
||||
urlError: PropTypes.string.isRequired,
|
||||
modalCloseOnly: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default memo(CustomURLModal);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import variables from 'modules/variables';
|
||||
|
||||
import { useState, memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { TextareaAutosize } from '@mui/material';
|
||||
import { MdAddLink, MdClose } from 'react-icons/md';
|
||||
import Tooltip from 'components/helpers/tooltip/Tooltip';
|
||||
|
@ -74,14 +73,4 @@ function AddModal({ urlError, iconError, addLink, closeModal, edit, editData, ed
|
|||
);
|
||||
}
|
||||
|
||||
AddModal.propTypes = {
|
||||
urlError: PropTypes.string.isRequired,
|
||||
iconError: PropTypes.string.isRequired,
|
||||
addLink: PropTypes.func.isRequired,
|
||||
closeModal: PropTypes.func.isRequired,
|
||||
edit: PropTypes.bool.isRequired,
|
||||
editData: PropTypes.object.isRequired,
|
||||
editLink: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default memo(AddModal);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Tabs from './backend/Tabs';
|
||||
|
||||
import Added from '../marketplace/sections/Added';
|
||||
|
@ -19,8 +18,4 @@ function Addons(props) {
|
|||
);
|
||||
}
|
||||
|
||||
Addons.propTypes = {
|
||||
changeTab: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default memo(Addons);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import Tabs from './backend/Tabs';
|
||||
import MarketplaceTab from '../marketplace/sections/Marketplace';
|
||||
|
@ -30,8 +29,4 @@ function Marketplace(props) {
|
|||
);
|
||||
}
|
||||
|
||||
Marketplace.propTypes = {
|
||||
changeTab: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default memo(Marketplace);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import Tabs from './backend/Tabs';
|
||||
|
||||
|
@ -17,7 +16,7 @@ import Search from '../settings/sections/Search';
|
|||
import Weather from '../settings/sections/Weather';
|
||||
import Appearance from '../settings/sections/Appearance';
|
||||
import Language from '../settings/sections/Language';
|
||||
import Advanced from '../settings/sections/advanced/Advanced';
|
||||
import Advanced from '../settings/sections/Advanced';
|
||||
import Stats from '../settings/sections/Stats';
|
||||
import Experimental from '../settings/sections/Experimental';
|
||||
import Changelog from '../settings/sections/Changelog';
|
||||
|
@ -117,8 +116,4 @@ function Settings(props) {
|
|||
);
|
||||
}
|
||||
|
||||
Settings.propTypes = {
|
||||
changeTab: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default memo(Settings);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {
|
||||
MdSettings as Settings,
|
||||
MdWidgets as Addons,
|
||||
|
@ -163,11 +162,4 @@ function Tab({ label, currentTab, onClick, navbarTab }) {
|
|||
);
|
||||
}
|
||||
|
||||
Tab.propTypes = {
|
||||
label: PropTypes.string.isRequired,
|
||||
currentTab: PropTypes.string.isRequired,
|
||||
onClick: PropTypes.func.isRequired,
|
||||
navbarTab: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default memo(Tab);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {
|
||||
MdSettings,
|
||||
MdOutlineShoppingBasket,
|
||||
|
@ -124,15 +123,4 @@ class Tabs extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
Tabs.propTypes = {
|
||||
children: PropTypes.instanceOf(Array).isRequired,
|
||||
current: PropTypes.string.isRequired,
|
||||
changeTab: PropTypes.func.isRequired,
|
||||
navbar: PropTypes.bool,
|
||||
};
|
||||
|
||||
Tabs.defaultProps = {
|
||||
navbar: false,
|
||||
};
|
||||
|
||||
export default Tabs;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function ProgressBar({ count, currentTab, switchTab }) {
|
||||
return (
|
||||
|
@ -18,10 +17,4 @@ function ProgressBar({ count, currentTab, switchTab }) {
|
|||
);
|
||||
}
|
||||
|
||||
ProgressBar.propTypes = {
|
||||
count: PropTypes.arrayOf(PropTypes.number).isRequired,
|
||||
currentTab: PropTypes.number.isRequired,
|
||||
switchTab: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default memo(ProgressBar);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import EventBus from 'modules/helpers/eventbus';
|
||||
|
||||
|
@ -147,9 +146,4 @@ class WelcomeModal extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
WelcomeModal.propTypes = {
|
||||
modalClose: PropTypes.func.isRequired,
|
||||
modalSkip: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default WelcomeModal;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import {
|
||||
MdCloudUpload,
|
||||
|
@ -423,9 +422,4 @@ class WelcomeSections extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
WelcomeSections.propTypes = {
|
||||
currentTab: PropTypes.number.isRequired,
|
||||
switchTab: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default WelcomeSections;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import EventBus from 'modules/helpers/eventbus';
|
||||
import Tooltip from 'components/helpers/tooltip/Tooltip';
|
||||
import { MdClose, MdDone } from 'react-icons/md';
|
||||
|
@ -46,9 +45,4 @@ function ExcludeModal({ modalClose, info }) {
|
|||
);
|
||||
}
|
||||
|
||||
ExcludeModal.propTypes = {
|
||||
modalClose: PropTypes.func.isRequired,
|
||||
info: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
export default memo(ExcludeModal);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { MdStar, MdStarBorder } from 'react-icons/md';
|
||||
|
||||
class Favourite extends PureComponent {
|
||||
|
@ -105,10 +104,4 @@ class Favourite extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
Favourite.propTypes = {
|
||||
credit: PropTypes.string,
|
||||
offline: PropTypes.bool,
|
||||
pun: PropTypes.string,
|
||||
};
|
||||
|
||||
export default Favourite;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { MdCropFree } from 'react-icons/md';
|
||||
|
||||
|
@ -88,8 +87,4 @@ class Maximise extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
Maximise.propTypes = {
|
||||
fontSize: PropTypes.number,
|
||||
};
|
||||
|
||||
export default Maximise;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { useState, memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Favourite from './Favourite';
|
||||
import {
|
||||
MdInfo,
|
||||
|
@ -386,10 +385,4 @@ function PhotoInformation({ info, url, api }) {
|
|||
);
|
||||
}
|
||||
|
||||
PhotoInformation.propTypes = {
|
||||
info: PropTypes.object.isRequired,
|
||||
url: PropTypes.string.isRequired,
|
||||
api: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default memo(PhotoInformation);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent, createRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { MdRefresh, MdSettings } from 'react-icons/md';
|
||||
|
||||
|
@ -155,8 +154,4 @@ class Navbar extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
Navbar.propTypes = {
|
||||
openModal: PropTypes.func,
|
||||
};
|
||||
|
||||
export default Navbar;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent, memo, useState } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { MdContentCopy, MdAssignment, MdPushPin, MdDownload } from 'react-icons/md';
|
||||
import { useFloating, shift } from '@floating-ui/react-dom';
|
||||
|
@ -170,12 +169,4 @@ function NotesWrapper() {
|
|||
);
|
||||
}
|
||||
|
||||
Notes.propTypes = {
|
||||
notesRef: PropTypes.object,
|
||||
floatRef: PropTypes.object,
|
||||
position: PropTypes.string,
|
||||
xPosition: PropTypes.number,
|
||||
yPosition: PropTypes.number,
|
||||
};
|
||||
|
||||
export default memo(NotesWrapper);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import variables from 'modules/variables';
|
||||
import { PureComponent, memo, useState } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import {
|
||||
MdChecklist,
|
||||
|
@ -248,12 +247,4 @@ function TodoWrapper() {
|
|||
);
|
||||
}
|
||||
|
||||
Todo.propTypes = {
|
||||
todoRef: PropTypes.object,
|
||||
floatRef: PropTypes.object,
|
||||
position: PropTypes.string,
|
||||
xPosition: PropTypes.string,
|
||||
yPosition: PropTypes.string,
|
||||
};
|
||||
|
||||
export default memo(TodoWrapper);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { WiHumidity, WiWindy, WiBarometer, WiCloud } from 'react-icons/wi';
|
||||
import { MdDisabledVisible } from 'react-icons/md';
|
||||
|
@ -116,10 +115,4 @@ function Expanded({ state, weatherType, variables }) {
|
|||
);
|
||||
}
|
||||
|
||||
Expanded.propTypes = {
|
||||
state: PropTypes.object.isRequired,
|
||||
weatherType: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
||||
variables: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
export default memo(Expanded);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import {
|
||||
WiDaySunny,
|
||||
|
@ -54,8 +53,4 @@ function WeatherIcon({ name }) {
|
|||
}
|
||||
}
|
||||
|
||||
WeatherIcon.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default memo(WeatherIcon);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import {
|
||||
WiDirectionDownLeft,
|
||||
|
@ -55,8 +54,4 @@ function WindDirectionIcon({ degrees }) {
|
|||
return direction && direction.icon;
|
||||
}
|
||||
|
||||
WindDirectionIcon.propTypes = {
|
||||
degrees: PropTypes.number.isRequired,
|
||||
};
|
||||
|
||||
export default memo(WindDirectionIcon);
|
||||
|
|
|
@ -117,38 +117,3 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.upcomingForecast {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
|
||||
div {
|
||||
@include themed {
|
||||
border-radius: t($borderRadius);
|
||||
border: 1px solid t($btn-backgroundHover);
|
||||
padding: 5px;
|
||||
flex: 1;
|
||||
|
||||
svg {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
span {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.period {
|
||||
color: t($color);
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.minmax {
|
||||
margin-top: 5px;
|
||||
flex-flow: column;
|
||||
gap: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue