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>
6
.env
|
@ -1,11 +1,11 @@
|
||||||
// API URLs
|
# API URLs
|
||||||
API_URL=https://api.muetab.com/v2
|
API_URL=https://api.muetab.com/v2
|
||||||
SPONSORS_URL=https://sponsors.muetab.com
|
SPONSORS_URL=https://sponsors.muetab.com
|
||||||
GITHUB_URL=https://api.github.com
|
GITHUB_URL=https://api.github.com
|
||||||
DDG_IMAGE_PROXY=https://external-content.duckduckgo.com/iu/?u=
|
DDG_IMAGE_PROXY=https://external-content.duckduckgo.com/iu/?u=
|
||||||
OPENSTREETMAP_URL=https://www.openstreetmap.org
|
OPENSTREETMAP_URL=https://www.openstreetmap.org
|
||||||
|
|
||||||
// Mue URLs
|
# Mue URLs
|
||||||
WEBSITE_URL=https://muetab.com
|
WEBSITE_URL=https://muetab.com
|
||||||
PRIVACY_URL=https://muetab.com/privacy
|
PRIVACY_URL=https://muetab.com/privacy
|
||||||
BLOG_POST=https://blog.muetab.com/posts/version-7-0
|
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
|
SENTRY_DSN =https://430352fd4b174d688ebd82fc85c22c58@o1217438.ingest.sentry.io/6359480
|
||||||
KNOWLEDGEBASE=https://support.muetab.com
|
KNOWLEDGEBASE=https://support.muetab.com
|
||||||
|
|
||||||
// Mue Info
|
# Mue Info
|
||||||
ORG_NAME=mue
|
ORG_NAME=mue
|
||||||
REPO_NAME=mue
|
REPO_NAME=mue
|
||||||
EMAIL=hello@muetab.com
|
EMAIL=hello@muetab.com
|
||||||
|
|
105
index.html
|
@ -11,28 +11,103 @@
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
<style>
|
<style>
|
||||||
*,
|
@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@400&display=swap');
|
||||||
a {
|
|
||||||
|
* {
|
||||||
font-family: 'Lexend Deca', sans-serif;
|
font-family: 'Lexend Deca', sans-serif;
|
||||||
text-align: center;
|
overflow: hidden;
|
||||||
color: black;
|
}
|
||||||
background: white !important;
|
|
||||||
|
.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) {
|
@media (prefers-color-scheme: dark) {
|
||||||
*,
|
* {
|
||||||
a {
|
background-color: #000000;
|
||||||
color: white;
|
}
|
||||||
background: #0a0a0a !important;
|
|
||||||
|
.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>
|
</style>
|
||||||
<h1>Error</h1>
|
<div class="criticalError">
|
||||||
<h2>You need to enable JavaScript to use Mue</h2>
|
<div class="criticalError-message">
|
||||||
<p>
|
<h1>A critical error has occurred</h1>
|
||||||
Having trouble? Contact us:
|
<p>The new tab could not be loaded. Please enable JavaScript and try again.</p>
|
||||||
<a href="https://muetab.com/contact">https://muetab.com/contact</a>
|
<div class="criticalError-actions">
|
||||||
</p>
|
<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>
|
</noscript>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script type="module" src="/src/index.jsx"></script>
|
<script type="module" src="/src/index.jsx"></script>
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es6"
|
"target": "es6",
|
||||||
|
"baseUrl": "src"
|
||||||
},
|
},
|
||||||
|
"include": ["src"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -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'),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,4 +1,9 @@
|
||||||
|
/* eslint-disable no-use-before-define */
|
||||||
/* eslint-disable no-undef */
|
/* eslint-disable no-undef */
|
||||||
|
if (typeof browser === "undefined") {
|
||||||
|
var browser = chrome;
|
||||||
|
}
|
||||||
|
|
||||||
browser.runtime.setUninstallURL('https://muetab.com/uninstall');
|
browser.runtime.setUninstallURL('https://muetab.com/uninstall');
|
||||||
|
|
||||||
browser.runtime.onInstalled.addListener((details) => {
|
browser.runtime.onInstalled.addListener((details) => {
|
|
@ -3302,7 +3302,7 @@ packages:
|
||||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite: 1.0.30001587
|
caniuse-lite: 1.0.30001588
|
||||||
electron-to-chromium: 1.4.673
|
electron-to-chromium: 1.4.673
|
||||||
node-releases: 2.0.14
|
node-releases: 2.0.14
|
||||||
update-browserslist-db: 1.0.13(browserslist@4.23.0)
|
update-browserslist-db: 1.0.13(browserslist@4.23.0)
|
||||||
|
@ -3337,8 +3337,8 @@ packages:
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/caniuse-lite@1.0.30001587:
|
/caniuse-lite@1.0.30001588:
|
||||||
resolution: {integrity: sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==}
|
resolution: {integrity: sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/chalk@2.4.2:
|
/chalk@2.4.2:
|
||||||
|
@ -3755,7 +3755,7 @@ packages:
|
||||||
string.prototype.trimstart: 1.0.7
|
string.prototype.trimstart: 1.0.7
|
||||||
typed-array-buffer: 1.0.1
|
typed-array-buffer: 1.0.1
|
||||||
typed-array-byte-length: 1.0.0
|
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
|
typed-array-length: 1.0.4
|
||||||
unbox-primitive: 1.0.2
|
unbox-primitive: 1.0.2
|
||||||
which-typed-array: 1.1.14
|
which-typed-array: 1.1.14
|
||||||
|
@ -6342,13 +6342,14 @@ packages:
|
||||||
is-typed-array: 1.1.13
|
is-typed-array: 1.1.13
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/typed-array-byte-offset@1.0.0:
|
/typed-array-byte-offset@1.0.1:
|
||||||
resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==}
|
resolution: {integrity: sha512-tcqKMrTRXjqvHN9S3553NPCaGL0VPgFI92lXszmrE8DMhiDPLBYLlvo8Uu4WZAAX/aGqp/T1sbA4ph8EWjDF9Q==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
dependencies:
|
dependencies:
|
||||||
available-typed-arrays: 1.0.6
|
available-typed-arrays: 1.0.6
|
||||||
call-bind: 1.0.7
|
call-bind: 1.0.7
|
||||||
for-each: 0.3.3
|
for-each: 0.3.3
|
||||||
|
gopd: 1.0.1
|
||||||
has-proto: 1.0.1
|
has-proto: 1.0.1
|
||||||
is-typed-array: 1.1.13
|
is-typed-array: 1.1.13
|
||||||
dev: true
|
dev: true
|
||||||
|
|
|
@ -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') {
|
if (file === 'en_GB.json') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const en = require('../src/translations/en_GB.json');
|
const en = require('../src/i18n/locales/en_GB.json');
|
||||||
const newdata = merge(en, require('../src/translations/' + file));
|
const newdata = merge(en, require('../src/i18n/locales/' + file));
|
||||||
|
|
||||||
// remove strings not in english file
|
// remove strings not in english file
|
||||||
compareAndRemoveKeys(newdata, en);
|
compareAndRemoveKeys(newdata, en);
|
||||||
|
|
||||||
// write new file
|
// 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
|
// add new line
|
||||||
fs.appendFileSync('../src/translations/' + file, '\n');
|
fs.appendFileSync('../src/i18n/locales/' + file, '\n');
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
import { ToastContainer } from 'react-toastify';
|
import { ToastContainer } from 'react-toastify';
|
||||||
|
|
||||||
import Background from 'components/widgets/background/Background';
|
import Background from 'features/widgets/background/Background';
|
||||||
import Widgets from 'components/widgets/Widgets';
|
import Widgets from 'features/widgets/Widgets';
|
||||||
import Modals from 'components/modals/Modals';
|
import Modals from 'features/modals/Modals';
|
||||||
|
|
||||||
import { loadSettings, moveSettings } from 'modules/helpers/settings';
|
import { loadSettings, moveSettings } from 'modules/helpers/settings';
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 645 B After Width: | Height: | Size: 645 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 308 KiB After Width: | Height: | Size: 308 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 274 KiB After Width: | Height: | Size: 274 KiB |
Before Width: | Height: | Size: 171 KiB After Width: | Height: | Size: 171 KiB |
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 161 KiB |
Before Width: | Height: | Size: 157 KiB After Width: | Height: | Size: 157 KiB |
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
@ -1,5 +1,5 @@
|
||||||
import React, { forwardRef } from 'react';
|
import React, { forwardRef } from 'react';
|
||||||
import Tooltip from '../../../helpers/tooltip/Tooltip';
|
import Tooltip from 'components/Elements/Tooltip/Tooltip';
|
||||||
|
|
||||||
const Button = forwardRef(
|
const Button = forwardRef(
|
||||||
(
|
(
|
||||||
|
@ -50,4 +50,4 @@ const Button = forwardRef(
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
export default Button;
|
export { Button as default, Button };
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './Button';
|
|
@ -1,10 +1,10 @@
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { MdClose, MdEmail, MdContentCopy } from 'react-icons/md';
|
import { MdClose, MdEmail, MdContentCopy } from 'react-icons/md';
|
||||||
import { FaTwitter, FaFacebookF } from 'react-icons/fa';
|
import { FaTwitter, FaFacebookF } from 'react-icons/fa';
|
||||||
import { AiFillWechat } from 'react-icons/ai';
|
import { AiFillWechat } from 'react-icons/ai';
|
||||||
import { SiTencentqq } from 'react-icons/si';
|
import { SiTencentqq } from 'react-icons/si';
|
||||||
import Tooltip from '../tooltip/Tooltip';
|
import Tooltip from '../Tooltip/Tooltip';
|
||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
|
|
||||||
import './sharemodal.scss';
|
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 };
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './ShareModal';
|
|
@ -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 };
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './Tooltip';
|
|
@ -0,0 +1,3 @@
|
||||||
|
export * from './Button';
|
||||||
|
export * from './Tooltip';
|
||||||
|
export * from './ShareModal';
|
|
@ -1,4 +1,4 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
import { Checkbox as CheckboxUI, FormControlLabel } from '@mui/material';
|
import { Checkbox as CheckboxUI, FormControlLabel } from '@mui/material';
|
||||||
|
|
||||||
|
@ -58,4 +58,4 @@ class Checkbox extends PureComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Checkbox;
|
export { Checkbox as default, Checkbox };
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './Checkbox';
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './ChipSelect';
|
|
@ -1,4 +1,4 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { PureComponent, createRef } from 'react';
|
import { PureComponent, createRef } from 'react';
|
||||||
import { InputLabel, MenuItem, FormControl, Select } from '@mui/material';
|
import { InputLabel, MenuItem, FormControl, Select } from '@mui/material';
|
||||||
|
|
||||||
|
@ -73,4 +73,4 @@ class Dropdown extends PureComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Dropdown;
|
export { Dropdown as default, Dropdown };
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './Dropdown';
|
|
@ -1,4 +1,4 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
import { compressAccurately, filetoDataURL } from 'image-conversion';
|
import { compressAccurately, filetoDataURL } from 'image-conversion';
|
||||||
|
@ -62,4 +62,4 @@ class FileUpload extends PureComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default FileUpload;
|
export { FileUpload as default, FileUpload };
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './FileUpload';
|
|
@ -1,4 +1,4 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
import {
|
import {
|
||||||
Radio as RadioUI,
|
Radio as RadioUI,
|
||||||
|
@ -84,4 +84,4 @@ class Radio extends PureComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Radio;
|
export { Radio as default, Radio };
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './Radio';
|
|
@ -1,4 +1,4 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
import { Slider } from '@mui/material';
|
import { Slider } from '@mui/material';
|
||||||
|
@ -85,4 +85,4 @@ class SliderComponent extends PureComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SliderComponent;
|
export { SliderComponent as default, SliderComponent as Slider };
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './Slider';
|
|
@ -1,4 +1,4 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
import { Switch as SwitchUI, FormControlLabel } from '@mui/material';
|
import { Switch as SwitchUI, FormControlLabel } from '@mui/material';
|
||||||
|
|
||||||
|
@ -53,4 +53,4 @@ class Switch extends PureComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Switch;
|
export { Switch as default, Switch };
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './Switch';
|
|
@ -1,4 +1,4 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
import { TextField } from '@mui/material';
|
import { TextField } from '@mui/material';
|
||||||
|
@ -81,4 +81,4 @@ class Text extends PureComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Text;
|
export { Text as default, Text };
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './Text';
|
|
@ -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';
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './Settings';
|
|
@ -1,4 +1,4 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
import {
|
import {
|
||||||
MdFlag,
|
MdFlag,
|
||||||
|
@ -7,13 +7,13 @@ import {
|
||||||
MdOutlineKeyboardArrowRight,
|
MdOutlineKeyboardArrowRight,
|
||||||
} from 'react-icons/md';
|
} from 'react-icons/md';
|
||||||
import EventBus from 'modules/helpers/eventbus';
|
import EventBus from 'modules/helpers/eventbus';
|
||||||
import Button from './Button';
|
import { Button } from 'components/Elements';
|
||||||
|
|
||||||
export const CustomActions = ({ children }) => {
|
export const CustomActions = ({ children }) => {
|
||||||
return children;
|
return children;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function Header(props) {
|
function Header(props) {
|
||||||
const [setting, setSetting] = useState(localStorage.getItem(props.setting) === 'true');
|
const [setting, setSetting] = useState(localStorage.getItem(props.setting) === 'true');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -88,5 +88,4 @@ export default function Header(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the export statement for customActions
|
export { Header as default, Header };
|
||||||
// export { customActions };
|
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './Header';
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './SettingsItem';
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { Row, Content, Action } from './SettingsItem';
|
import { Row, Content, Action } from '../Item/SettingsItem';
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import Slider from './Slider';
|
import Slider from '../../../Form/Settings/Slider/Slider';
|
||||||
|
|
||||||
import { values } from 'modules/helpers/settings/modals';
|
import { values } from 'modules/helpers/settings/modals';
|
||||||
import EventBus from 'modules/helpers/eventbus';
|
import EventBus from 'modules/helpers/eventbus';
|
||||||
|
@ -43,4 +43,4 @@ const PreferencesWrapper = ({ children, ...props }) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default PreferencesWrapper;
|
export { PreferencesWrapper as default, PreferencesWrapper };
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './PreferencesWrapper';
|
|
@ -1,7 +1,7 @@
|
||||||
import { MdOutlineKeyboardArrowRight } from 'react-icons/md';
|
import { MdOutlineKeyboardArrowRight } from 'react-icons/md';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
export default function Section({ title, subtitle, icon, onClick, children }) {
|
function Section({ title, subtitle, icon, onClick, children }) {
|
||||||
return (
|
return (
|
||||||
<div className="moreSettings" onClick={onClick}>
|
<div className="moreSettings" onClick={onClick}>
|
||||||
<div className="left">
|
<div className="left">
|
||||||
|
@ -12,8 +12,10 @@ export default function Section({ title, subtitle, icon, onClick, children }) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="action">
|
<div className="action">
|
||||||
{React.Children.count(children) === 0 ? <MdOutlineKeyboardArrowRight /> : children}
|
{React.Children.count(children) === 0 ? <MdOutlineKeyboardArrowRight /> : children}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export { Section as default, Section };
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './Section';
|
|
@ -0,0 +1,4 @@
|
||||||
|
export * from './Header';
|
||||||
|
export * from './Item';
|
||||||
|
export * from './PreferencesWrapper';
|
||||||
|
export * from './Section';
|
|
@ -0,0 +1,5 @@
|
||||||
|
const WidgetsLayout = ({ children }) => {
|
||||||
|
return <div id="widgets">{children}</div>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export { WidgetsLayout as default, WidgetsLayout };
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './WidgetsLayout';
|
|
@ -0,0 +1,2 @@
|
||||||
|
export * from './Settings';
|
||||||
|
export * from './WidgetsLayout';
|
|
@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -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"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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
|
|
@ -1,4 +1,4 @@
|
||||||
import * as constants from 'modules/constants';
|
import * as constants from 'config/constants';
|
||||||
import Stats from 'modules/helpers/stats';
|
import Stats from 'modules/helpers/stats';
|
||||||
|
|
||||||
const variables = {
|
const variables = {
|
|
@ -3,7 +3,7 @@ import { MdOutlineArrowForwardIos, MdOutlineArrowBackIos } from 'react-icons/md'
|
||||||
import useEmblaCarousel from 'embla-carousel-react';
|
import useEmblaCarousel from 'embla-carousel-react';
|
||||||
import Autoplay from 'embla-carousel-autoplay';
|
import Autoplay from 'embla-carousel-autoplay';
|
||||||
|
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
|
|
||||||
import './carousel.scss';
|
import './carousel.scss';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import './preview.scss';
|
import './preview.scss';
|
||||||
|
|
||||||
function Preview(props) {
|
function Preview(props) {
|
|
@ -1,10 +1,10 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
|
|
||||||
import { MdErrorOutline, MdRefresh } from 'react-icons/md';
|
import { MdErrorOutline, MdRefresh } from 'react-icons/md';
|
||||||
import { captureException } from '@sentry/react';
|
import { captureException } from '@sentry/react';
|
||||||
|
|
||||||
import Button from './main/settings/Button';
|
import { Button } from 'components/Elements';
|
||||||
|
|
||||||
class ErrorBoundary extends PureComponent {
|
class ErrorBoundary extends PureComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
|
@ -1,4 +1,4 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
import Modal from 'react-modal';
|
import Modal from 'react-modal';
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { Suspense, lazy, useState, memo } from 'react';
|
import { Suspense, lazy, useState, memo } from 'react';
|
||||||
import { MdClose } from 'react-icons/md';
|
import { MdClose } from 'react-icons/md';
|
||||||
|
|
||||||
import './scss/index.scss';
|
import './scss/index.scss';
|
||||||
import Tooltip from 'components/helpers/tooltip/Tooltip';
|
import { Tooltip } from 'components/Elements';
|
||||||
|
|
||||||
const Settings = lazy(() => import('./tabs/Settings'));
|
const Settings = lazy(() => import('./tabs/Settings'));
|
||||||
const Addons = lazy(() => import('./tabs/Addons'));
|
const Addons = lazy(() => import('./tabs/Addons'));
|
||||||
const Marketplace = lazy(() => import('./tabs/Marketplace'));
|
const Marketplace = lazy(() => import('./tabs/Marketplace'));
|
|
@ -1,7 +1,7 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { PureComponent, Fragment } from 'react';
|
import { PureComponent, Fragment } from 'react';
|
||||||
import Tooltip from 'components/helpers/tooltip/Tooltip';
|
import { Tooltip } from 'components/Elements';
|
||||||
import ImageCarousel from 'components/helpers/carousel/Carousel';
|
import ImageCarousel from 'features/helpers/carousel/Carousel';
|
||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
import {
|
import {
|
||||||
MdIosShare,
|
MdIosShare,
|
||||||
|
@ -17,12 +17,12 @@ import {
|
||||||
} from 'react-icons/md';
|
} from 'react-icons/md';
|
||||||
import Modal from 'react-modal';
|
import Modal from 'react-modal';
|
||||||
|
|
||||||
import Header from '../settings/Header';
|
import { Header } from 'components/Layout/Settings';
|
||||||
import Button from '../settings/Button';
|
import { Button } from 'components/Elements';
|
||||||
|
|
||||||
import { install, uninstall } from 'modules/helpers/marketplace';
|
import { install, uninstall } from 'modules/helpers/marketplace';
|
||||||
|
|
||||||
import ShareModal from 'components/helpers/sharemodal/ShareModal';
|
import { ShareModal } from 'components/Elements';
|
||||||
|
|
||||||
class Item extends PureComponent {
|
class Item extends PureComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
|
@ -1,8 +1,8 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import React, { memo } from 'react';
|
import React, { memo } from 'react';
|
||||||
import { MdAutoFixHigh, MdOutlineArrowForward, MdOutlineOpenInNew } from 'react-icons/md';
|
import { MdAutoFixHigh, MdOutlineArrowForward, MdOutlineOpenInNew } from 'react-icons/md';
|
||||||
|
|
||||||
import Button from '../settings/Button';
|
import { Button } from 'components/Elements';
|
||||||
|
|
||||||
function Items({
|
function Items({
|
||||||
type,
|
type,
|
|
@ -1,5 +1,5 @@
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
|
|
||||||
function Lightbox({ modalClose, img }) {
|
function Lightbox({ modalClose, img }) {
|
||||||
variables.stats.postEvent('modal', 'Opened lightbox');
|
variables.stats.postEvent('modal', 'Opened lightbox');
|
|
@ -1,8 +1,7 @@
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { MdClose } from 'react-icons/md';
|
import { MdClose } from 'react-icons/md';
|
||||||
import Tooltip from 'components/helpers/tooltip/Tooltip';
|
import { Tooltip } from 'components/Elements';
|
||||||
|
|
||||||
function SideloadFailedModal({ modalClose, reason }) {
|
function SideloadFailedModal({ modalClose, reason }) {
|
||||||
return (
|
return (
|
||||||
<div className="smallModal">
|
<div className="smallModal">
|
|
@ -1,16 +1,16 @@
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
import { MdUpdate, MdOutlineExtensionOff, MdSendTimeExtension } from 'react-icons/md';
|
import { MdUpdate, MdOutlineExtensionOff, MdSendTimeExtension } from 'react-icons/md';
|
||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
import Modal from 'react-modal';
|
import Modal from 'react-modal';
|
||||||
|
|
||||||
import SideloadFailedModal from '../SideloadFailedModal';
|
import SideloadFailedModal from '../SideloadFailedModal';
|
||||||
import FileUpload from '../../settings/FileUpload';
|
import FileUpload from '../../../../../components/Form/Settings/FileUpload/FileUpload';
|
||||||
import Item from '../Item';
|
import Item from '../Item';
|
||||||
import Items from '../Items';
|
import Items from '../Items';
|
||||||
import Dropdown from '../../settings/Dropdown';
|
import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown';
|
||||||
import Header, { CustomActions } from '../../settings/Header';
|
import { Header, CustomActions } from 'components/Layout/Settings';
|
||||||
import Button from '../../settings/Button';
|
import { Button } from 'components/Elements';
|
||||||
|
|
||||||
import { install, uninstall, urlParser } from 'modules/helpers/marketplace';
|
import { install, uninstall, urlParser } from 'modules/helpers/marketplace';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable no-unused-vars */
|
/* eslint-disable no-unused-vars */
|
||||||
import variables from 'modules/variables';
|
import variables from 'config/variables';
|
||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
import { MdOutlineExtensionOff } from 'react-icons/md';
|
import { MdOutlineExtensionOff } from 'react-icons/md';
|
||||||
|
|