7.x Structural Changes (#637)

* refactor(files): Initial commit on experimental file structure

* refactor(structure): New components system

* refactor(structure): Tidy settings' components

* Refactor(structure): Component exports and imports

* refactor(settings): Use new component imports

* feat: unified background.js script

* fix(build): Partially, distributions still not ready

* feat: critical error on noscript, light theme support for it

* fix(background): Critical issue of code making every background #000

* refactor(welcome): Partition into different files + shared components
- This took too long and destroyed my sanity

---------

Co-authored-by: alexsparkes <turbomarshmello@gmail.com>
Co-authored-by: alexsparkes <alexsparkes@gmail.com>
This commit is contained in:
David Ralph 2024-02-18 23:05:15 +00:00 committed by GitHub
parent 8fc6b1bf1b
commit 10f12b20c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
233 changed files with 979 additions and 426 deletions

6
.env
View File

@ -1,11 +1,11 @@
// API URLs
# API URLs
API_URL=https://api.muetab.com/v2
SPONSORS_URL=https://sponsors.muetab.com
GITHUB_URL=https://api.github.com
DDG_IMAGE_PROXY=https://external-content.duckduckgo.com/iu/?u=
OPENSTREETMAP_URL=https://www.openstreetmap.org
// Mue URLs
# Mue URLs
WEBSITE_URL=https://muetab.com
PRIVACY_URL=https://muetab.com/privacy
BLOG_POST=https://blog.muetab.com/posts/version-7-0
@ -17,7 +17,7 @@ DONATE_LINK=https://muetab.com/donate
SENTRY_DSN =https://430352fd4b174d688ebd82fc85c22c58@o1217438.ingest.sentry.io/6359480
KNOWLEDGEBASE=https://support.muetab.com
// Mue Info
# Mue Info
ORG_NAME=mue
REPO_NAME=mue
EMAIL=hello@muetab.com

View File

@ -11,28 +11,103 @@
<body>
<noscript>
<style>
*,
a {
@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@400&display=swap');
* {
font-family: 'Lexend Deca', sans-serif;
text-align: center;
color: black;
background: white !important;
overflow: hidden;
}
.criticalError {
display: grid;
place-items: center;
width: 100vw;
height: 100vh;
}
.criticalError .criticalError-actions {
display: flex;
flex-flow: row;
gap: 20px;
}
.criticalError a {
border: 0;
border-radius: 12px;
padding: 10px 30px 10px 30px;
font-size: 1rem;
display: flex;
align-items: center;
flex-flow: row;
justify-content: center;
gap: 20px;
transition: 0.5s;
cursor: pointer;
text-decoration: none;
}
@media (prefers-color-scheme: dark) {
*,
a {
color: white;
background: #0a0a0a !important;
* {
background-color: #000000;
}
.criticalError .criticalError-message {
color: #fff;
}
.criticalError p {
color: rgba(255, 255, 255, 0.7529411765);
}
.criticalError a {
background: #0e1013;
box-shadow: 0 0 0 1px #484848;
color: #fff;
}
.criticalError a:hover {
background: #1e1e1e;
}
}
@media (prefers-color-scheme: light) {
* {
background-color: #ffffff;
}
.criticalError .criticalError-message {
color: #000;
}
.criticalError p {
color: rgba(0, 0, 0, 0.7529411765);
}
.criticalError a {
background: #fdfdfd;
box-shadow: 0 0 0 1px #484848;
color: #000;
}
.criticalError a:hover {
background: #f5f5f5;
}
}
</style>
<h1>Error</h1>
<h2>You need to enable JavaScript to use Mue</h2>
<p>
Having trouble? Contact us:
<a href="https://muetab.com/contact">https://muetab.com/contact</a>
</p>
<div class="criticalError">
<div class="criticalError-message">
<h1>A critical error has occurred</h1>
<p>The new tab could not be loaded. Please enable JavaScript and try again.</p>
<div class="criticalError-actions">
<a href="https://github.com/mue/mue/issues/new/choose" target="_blank" rel="noreferrer"
>Report Issue</a
>
<a href="https://discord.gg/zv8C9F8" target="_blank" rel="noreferrer"
>Support Discord</a
>
</div>
</div>
</div>
</noscript>
<div id="root"></div>
<script type="module" src="/src/index.jsx"></script>

View File

@ -1,7 +1,9 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6"
"target": "es6",
"baseUrl": "src"
},
"include": ["src"],
"exclude": ["node_modules"]
}

View File

@ -1,10 +0,0 @@
/* eslint-disable no-undef */
chrome.runtime.setUninstallURL('https://muetab.com/uninstall');
chrome.runtime.onInstalled.addListener((details) => {
if (details.reason === 'install') {
chrome.tabs.create({
url: chrome.runtime.getURL('index.html'),
});
}
});

View File

@ -1,4 +1,9 @@
/* eslint-disable no-use-before-define */
/* eslint-disable no-undef */
if (typeof browser === "undefined") {
var browser = chrome;
}
browser.runtime.setUninstallURL('https://muetab.com/uninstall');
browser.runtime.onInstalled.addListener((details) => {

View File

@ -3302,7 +3302,7 @@ packages:
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
caniuse-lite: 1.0.30001587
caniuse-lite: 1.0.30001588
electron-to-chromium: 1.4.673
node-releases: 2.0.14
update-browserslist-db: 1.0.13(browserslist@4.23.0)
@ -3337,8 +3337,8 @@ packages:
engines: {node: '>=6'}
dev: true
/caniuse-lite@1.0.30001587:
resolution: {integrity: sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==}
/caniuse-lite@1.0.30001588:
resolution: {integrity: sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ==}
dev: true
/chalk@2.4.2:
@ -3755,7 +3755,7 @@ packages:
string.prototype.trimstart: 1.0.7
typed-array-buffer: 1.0.1
typed-array-byte-length: 1.0.0
typed-array-byte-offset: 1.0.0
typed-array-byte-offset: 1.0.1
typed-array-length: 1.0.4
unbox-primitive: 1.0.2
which-typed-array: 1.1.14
@ -6342,13 +6342,14 @@ packages:
is-typed-array: 1.1.13
dev: true
/typed-array-byte-offset@1.0.0:
resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==}
/typed-array-byte-offset@1.0.1:
resolution: {integrity: sha512-tcqKMrTRXjqvHN9S3553NPCaGL0VPgFI92lXszmrE8DMhiDPLBYLlvo8Uu4WZAAX/aGqp/T1sbA4ph8EWjDF9Q==}
engines: {node: '>= 0.4'}
dependencies:
available-typed-arrays: 1.0.6
call-bind: 1.0.7
for-each: 0.3.3
gopd: 1.0.1
has-proto: 1.0.1
is-typed-array: 1.1.13
dev: true

View File

@ -20,20 +20,20 @@ const compareAndRemoveKeys = (json1, json2) => {
}
};
fs.readdirSync('../src/translations').forEach((file) => {
fs.readdirSync('../src/i18n/locales').forEach((file) => {
if (file === 'en_GB.json') {
return;
}
const en = require('../src/translations/en_GB.json');
const newdata = merge(en, require('../src/translations/' + file));
const en = require('../src/i18n/locales/en_GB.json');
const newdata = merge(en, require('../src/i18n/locales/' + file));
// remove strings not in english file
compareAndRemoveKeys(newdata, en);
// write new file
fs.writeFileSync('../src/translations/' + file, JSON.stringify(newdata, null, 2));
fs.writeFileSync('../src/i18n/locales/' + file, JSON.stringify(newdata, null, 2));
// add new line
fs.appendFileSync('../src/translations/' + file, '\n');
fs.appendFileSync('../src/i18n/locales/' + file, '\n');
});

View File

@ -1,10 +1,10 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import { PureComponent } from 'react';
import { ToastContainer } from 'react-toastify';
import Background from 'components/widgets/background/Background';
import Widgets from 'components/widgets/Widgets';
import Modals from 'components/modals/Modals';
import Background from 'features/widgets/background/Background';
import Widgets from 'features/widgets/Widgets';
import Modals from 'features/modals/Modals';
import { loadSettings, moveSettings } from 'modules/helpers/settings';

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 645 B

After

Width:  |  Height:  |  Size: 645 B

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 308 KiB

After

Width:  |  Height:  |  Size: 308 KiB

View File

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

View File

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View File

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

Before

Width:  |  Height:  |  Size: 274 KiB

After

Width:  |  Height:  |  Size: 274 KiB

View File

Before

Width:  |  Height:  |  Size: 171 KiB

After

Width:  |  Height:  |  Size: 171 KiB

View File

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 161 KiB

View File

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 157 KiB

View File

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 136 KiB

View File

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 126 KiB

View File

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 124 KiB

View File

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

View File

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -1,5 +1,5 @@
import React, { forwardRef } from 'react';
import Tooltip from '../../../helpers/tooltip/Tooltip';
import Tooltip from 'components/Elements/Tooltip/Tooltip';
const Button = forwardRef(
(
@ -50,4 +50,4 @@ const Button = forwardRef(
},
);
export default Button;
export { Button as default, Button };

View File

@ -0,0 +1 @@
export * from './Button';

View File

@ -1,10 +1,10 @@
import { memo } from 'react';
import variables from 'modules/variables';
import variables from 'config/variables';
import { MdClose, MdEmail, MdContentCopy } from 'react-icons/md';
import { FaTwitter, FaFacebookF } from 'react-icons/fa';
import { AiFillWechat } from 'react-icons/ai';
import { SiTencentqq } from 'react-icons/si';
import Tooltip from '../tooltip/Tooltip';
import Tooltip from '../Tooltip/Tooltip';
import { toast } from 'react-toastify';
import './sharemodal.scss';
@ -123,4 +123,6 @@ function ShareModal({ modalClose, data }) {
);
}
export default memo(ShareModal);
const MemoizedSharemodal = memo(ShareModal);
export { MemoizedSharemodal as default, MemoizedSharemodal as ShareModal };

View File

@ -0,0 +1 @@
export * from './ShareModal';

View File

@ -47,4 +47,6 @@ function Tooltip({ children, title, style, placement, subtitle }) {
);
}
export default memo(Tooltip);
const MemoizedTooltip = memo(Tooltip);
export { MemoizedTooltip as default, MemoizedTooltip as Tooltip };

View File

@ -0,0 +1 @@
export * from './Tooltip';

View File

@ -0,0 +1,3 @@
export * from './Button';
export * from './Tooltip';
export * from './ShareModal';

View File

@ -1,4 +1,4 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import { PureComponent } from 'react';
import { Checkbox as CheckboxUI, FormControlLabel } from '@mui/material';
@ -58,4 +58,4 @@ class Checkbox extends PureComponent {
}
}
export default Checkbox;
export { Checkbox as default, Checkbox };

View File

@ -0,0 +1 @@
export * from './Checkbox';

View File

@ -0,0 +1 @@
export * from './ChipSelect';

View File

@ -1,4 +1,4 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import { PureComponent, createRef } from 'react';
import { InputLabel, MenuItem, FormControl, Select } from '@mui/material';
@ -73,4 +73,4 @@ class Dropdown extends PureComponent {
}
}
export default Dropdown;
export { Dropdown as default, Dropdown };

View File

@ -0,0 +1 @@
export * from './Dropdown';

View File

@ -1,4 +1,4 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import { PureComponent } from 'react';
import { toast } from 'react-toastify';
import { compressAccurately, filetoDataURL } from 'image-conversion';
@ -62,4 +62,4 @@ class FileUpload extends PureComponent {
}
}
export default FileUpload;
export { FileUpload as default, FileUpload };

View File

@ -0,0 +1 @@
export * from './FileUpload';

View File

@ -1,4 +1,4 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import { PureComponent } from 'react';
import {
Radio as RadioUI,
@ -84,4 +84,4 @@ class Radio extends PureComponent {
}
}
export default Radio;
export { Radio as default, Radio };

View File

@ -0,0 +1 @@
export * from './Radio';

View File

@ -1,4 +1,4 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import { PureComponent } from 'react';
import { toast } from 'react-toastify';
import { Slider } from '@mui/material';
@ -85,4 +85,4 @@ class SliderComponent extends PureComponent {
}
}
export default SliderComponent;
export { SliderComponent as default, SliderComponent as Slider };

View File

@ -0,0 +1 @@
export * from './Slider';

View File

@ -1,4 +1,4 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import { PureComponent } from 'react';
import { Switch as SwitchUI, FormControlLabel } from '@mui/material';
@ -53,4 +53,4 @@ class Switch extends PureComponent {
}
}
export default Switch;
export { Switch as default, Switch };

View File

@ -0,0 +1 @@
export * from './Switch';

View File

@ -1,4 +1,4 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import { PureComponent } from 'react';
import { toast } from 'react-toastify';
import { TextField } from '@mui/material';
@ -81,4 +81,4 @@ class Text extends PureComponent {
}
}
export default Text;
export { Text as default, Text };

View File

@ -0,0 +1 @@
export * from './Text';

View File

@ -0,0 +1,8 @@
export * from './Checkbox';
export * from './ChipSelect';
export * from './Dropdown';
export * from './FileUpload';
export * from './Radio';
export * from './Slider';
export * from './Switch';
export * from './Text';

View File

@ -0,0 +1 @@
export * from './Settings';

View File

@ -1,4 +1,4 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import { useState, useEffect } from 'react';
import {
MdFlag,
@ -7,13 +7,13 @@ import {
MdOutlineKeyboardArrowRight,
} from 'react-icons/md';
import EventBus from 'modules/helpers/eventbus';
import Button from './Button';
import { Button } from 'components/Elements';
export const CustomActions = ({ children }) => {
return children;
};
export default function Header(props) {
function Header(props) {
const [setting, setSetting] = useState(localStorage.getItem(props.setting) === 'true');
useEffect(() => {
@ -88,5 +88,4 @@ export default function Header(props) {
);
}
// Remove the export statement for customActions
// export { customActions };
export { Header as default, Header };

View File

@ -0,0 +1 @@
export * from './Header';

View File

@ -0,0 +1 @@
export * from './SettingsItem';

View File

@ -1,7 +1,7 @@
import React, { useState } from 'react';
import { Row, Content, Action } from './SettingsItem';
import variables from 'modules/variables';
import Slider from './Slider';
import { Row, Content, Action } from '../Item/SettingsItem';
import variables from 'config/variables';
import Slider from '../../../Form/Settings/Slider/Slider';
import { values } from 'modules/helpers/settings/modals';
import EventBus from 'modules/helpers/eventbus';
@ -43,4 +43,4 @@ const PreferencesWrapper = ({ children, ...props }) => {
);
};
export default PreferencesWrapper;
export { PreferencesWrapper as default, PreferencesWrapper };

View File

@ -0,0 +1 @@
export * from './PreferencesWrapper';

View File

@ -1,7 +1,7 @@
import { MdOutlineKeyboardArrowRight } from 'react-icons/md';
import React from 'react';
export default function Section({ title, subtitle, icon, onClick, children }) {
function Section({ title, subtitle, icon, onClick, children }) {
return (
<div className="moreSettings" onClick={onClick}>
<div className="left">
@ -12,8 +12,10 @@ export default function Section({ title, subtitle, icon, onClick, children }) {
</div>
</div>
<div className="action">
{React.Children.count(children) === 0 ? <MdOutlineKeyboardArrowRight /> : children}
{React.Children.count(children) === 0 ? <MdOutlineKeyboardArrowRight /> : children}
</div>
</div>
);
}
export { Section as default, Section };

View File

@ -0,0 +1 @@
export * from './Section';

View File

@ -0,0 +1,4 @@
export * from './Header';
export * from './Item';
export * from './PreferencesWrapper';
export * from './Section';

View File

@ -0,0 +1,5 @@
const WidgetsLayout = ({ children }) => {
return <div id="widgets">{children}</div>;
};
export { WidgetsLayout as default, WidgetsLayout };

View File

@ -0,0 +1 @@
export * from './WidgetsLayout';

View File

@ -0,0 +1,2 @@
export * from './Settings';
export * from './WidgetsLayout';

View File

@ -1,25 +0,0 @@
{
"name": "Example Photos",
"description": "This is an example.",
"type": "photos",
"version": "1.0.0",
"author": "Mue",
"icon_url": "https://raw.githubusercontent.com/mue/branding/main/logo/logo_square.png",
"screenshot_url": "https://github.com/mue/mue/raw/main/assets/screenshot.webp",
"photos": [
{
"photographer": "Example photographer",
"location": "Example location",
"url": {
"default": "https://github.com/mue/mue/raw/main/assets/screenshot.webp"
}
},
{
"photographer": "Example photographer 2",
"location": "Example location 2",
"url": {
"default": "https://github.com/mue/mue/raw/main/assets/screenshot2.webp"
}
}
]
}

View File

@ -1,20 +0,0 @@
{
"name": "Example Quotes",
"description": "This is an example.",
"type": "quotes",
"version": "1.0.0",
"author": "Mue",
"icon_url": "https://raw.githubusercontent.com/mue/branding/main/logo/logo_square.png",
"screenshot_url": "https://github.com/mue/mue/raw/main/assets/screenshot.webp",
"language": "en",
"quotes": [
{
"quote": "This is an example quote.",
"author": "Example 1"
},
{
"quote": "This is another example quote.",
"author": "Example 2"
}
]
}

View File

@ -1,13 +0,0 @@
{
"name": "Example Settings",
"description": "This is an example.",
"type": "settings",
"version": "1.0.0",
"author": "Mue",
"icon_url": "https://raw.githubusercontent.com/mue/branding/main/logo/logo_square.png",
"screenshot_url": "https://github.com/mue/mue/raw/main/assets/screenshot.webp",
"settings": {
"searchBar": false,
"weather": true
}
}

28
src/config/.env Normal file
View File

@ -0,0 +1,28 @@
# API URLs
API_URL=https://api.muetab.com/v2
SPONSORS_URL=https://sponsors.muetab.com
GITHUB_URL=https://api.github.com
DDG_IMAGE_PROXY=https://external-content.duckduckgo.com/iu/?u=
OPENSTREETMAP_URL=https://www.openstreetmap.org
# Mue URLs
WEBSITE_URL=https://muetab.com
PRIVACY_URL=https://muetab.com/privacy
BLOG_POST=https://blog.muetab.com/posts/version-7-0
TRANSLATIONS_URL=https://docs.muetab.com/translations/
WEBLATE_URL=https://hosted.weblate.org/projects/mue/mue-tab/
REPORT_ITEM=https://github.com/mue/marketplace/issues/new?assignees=&labels=item+report&template=item-report.md&title=%5BItem+Report%5D+
BUG_REPORT=https://github.com/mue/mue/issues/new?assignees=&labels=issue+report&template=bug-report.md&title=%5BBug%5D+
DONATE_LINK=https://muetab.com/donate
SENTRY_DSN=https://430352fd4b174d688ebd82fc85c22c58@o1217438.ingest.sentry.io/6359480
KNOWLEDGEBASE=https://support.muetab.com
# Mue Info
ORG_NAME=mue
REPO_NAME=mue
EMAIL=hello@muetab.com
TWITTER_HANDLE=getmue
DISCORD_SERVER=zv8C9F8
OPENCOLLECTIVE_USERNAME=mue
VERSION=7.0.1

View File

@ -1,4 +1,4 @@
import * as constants from 'modules/constants';
import * as constants from 'config/constants';
import Stats from 'modules/helpers/stats';
const variables = {

View File

@ -3,7 +3,7 @@ import { MdOutlineArrowForwardIos, MdOutlineArrowBackIos } from 'react-icons/md'
import useEmblaCarousel from 'embla-carousel-react';
import Autoplay from 'embla-carousel-autoplay';
import variables from 'modules/variables';
import variables from 'config/variables';
import './carousel.scss';

View File

@ -1,5 +1,5 @@
import { memo } from 'react';
import variables from 'modules/variables';
import variables from 'config/variables';
import './preview.scss';
function Preview(props) {

View File

@ -1,10 +1,10 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import { PureComponent } from 'react';
import { MdErrorOutline, MdRefresh } from 'react-icons/md';
import { captureException } from '@sentry/react';
import Button from './main/settings/Button';
import { Button } from 'components/Elements';
class ErrorBoundary extends PureComponent {
constructor(props) {

View File

@ -1,4 +1,4 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import { PureComponent } from 'react';
import Modal from 'react-modal';

View File

@ -1,10 +1,9 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import { Suspense, lazy, useState, memo } from 'react';
import { MdClose } from 'react-icons/md';
import './scss/index.scss';
import Tooltip from 'components/helpers/tooltip/Tooltip';
import { Tooltip } from 'components/Elements';
const Settings = lazy(() => import('./tabs/Settings'));
const Addons = lazy(() => import('./tabs/Addons'));
const Marketplace = lazy(() => import('./tabs/Marketplace'));

View File

@ -1,7 +1,7 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import { PureComponent, Fragment } from 'react';
import Tooltip from 'components/helpers/tooltip/Tooltip';
import ImageCarousel from 'components/helpers/carousel/Carousel';
import { Tooltip } from 'components/Elements';
import ImageCarousel from 'features/helpers/carousel/Carousel';
import { toast } from 'react-toastify';
import {
MdIosShare,
@ -17,12 +17,12 @@ import {
} from 'react-icons/md';
import Modal from 'react-modal';
import Header from '../settings/Header';
import Button from '../settings/Button';
import { Header } from 'components/Layout/Settings';
import { Button } from 'components/Elements';
import { install, uninstall } from 'modules/helpers/marketplace';
import ShareModal from 'components/helpers/sharemodal/ShareModal';
import { ShareModal } from 'components/Elements';
class Item extends PureComponent {
constructor(props) {

View File

@ -1,8 +1,8 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import React, { memo } from 'react';
import { MdAutoFixHigh, MdOutlineArrowForward, MdOutlineOpenInNew } from 'react-icons/md';
import Button from '../settings/Button';
import { Button } from 'components/Elements';
function Items({
type,

View File

@ -1,5 +1,5 @@
import { memo } from 'react';
import variables from 'modules/variables';
import variables from 'config/variables';
function Lightbox({ modalClose, img }) {
variables.stats.postEvent('modal', 'Opened lightbox');

View File

@ -1,8 +1,7 @@
import { memo } from 'react';
import variables from 'modules/variables';
import variables from 'config/variables';
import { MdClose } from 'react-icons/md';
import Tooltip from 'components/helpers/tooltip/Tooltip';
import { Tooltip } from 'components/Elements';
function SideloadFailedModal({ modalClose, reason }) {
return (
<div className="smallModal">

View File

@ -1,16 +1,16 @@
import variables from 'modules/variables';
import variables from 'config/variables';
import { PureComponent } from 'react';
import { MdUpdate, MdOutlineExtensionOff, MdSendTimeExtension } from 'react-icons/md';
import { toast } from 'react-toastify';
import Modal from 'react-modal';
import SideloadFailedModal from '../SideloadFailedModal';
import FileUpload from '../../settings/FileUpload';
import FileUpload from '../../../../../components/Form/Settings/FileUpload/FileUpload';
import Item from '../Item';
import Items from '../Items';
import Dropdown from '../../settings/Dropdown';
import Header, { CustomActions } from '../../settings/Header';
import Button from '../../settings/Button';
import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown';
import { Header, CustomActions } from 'components/Layout/Settings';
import { Button } from 'components/Elements';
import { install, uninstall, urlParser } from 'modules/helpers/marketplace';

View File

@ -1,5 +1,5 @@
/* eslint-disable no-unused-vars */
import variables from 'modules/variables';
import variables from 'config/variables';
import { PureComponent } from 'react';
import { MdOutlineExtensionOff } from 'react-icons/md';

Some files were not shown because too many files have changed in this diff Show More