diff --git a/src/components/modals/settings/sections/Advanced.jsx b/src/components/modals/settings/sections/Advanced.jsx new file mode 100644 index 00000000..c3864144 --- /dev/null +++ b/src/components/modals/settings/sections/Advanced.jsx @@ -0,0 +1,59 @@ +import React from 'react'; + +import Checkbox from '../Checkbox'; +import FileUpload from '../FileUpload'; + +import SettingsFunctions from '../../../../modules/helpers/settings'; + +import { toast } from 'react-toastify'; + +export default class AdvancedSettings extends React.PureComponent { + resetItem() { + document.getElementById('customcss').value = ''; + toast(this.props.toastLanguage.reset); + } + + componentDidMount() { + document.getElementById('customcss').value = localStorage.getItem('customcss'); + } + + settingsImport(e) { + const content = JSON.parse(e.target.result); + + for (const key of Object.keys(content)) { + localStorage.setItem(key, content[key]); + } + + toast(this.props.toastLanguage.imported); + } + + componentWillUnmount() { + localStorage.setItem('customcss', document.getElementById('customcss').value); + } + + render() { + return ( +
+

Advanced

+ +

Data

+ + + + this.settingsImport(e)} /> +

Customisation

+
    +

    Custom CSS this.resetItem()}>Reset

    + +
+
    +

    Custom JS this.resetItem()}>Reset

    + +
+

Experimental

+

Please note that the Mue team cannot provide support if you have experimental mode on. Please disable it first and see if the issues continue to occur before contacting support.

+ +
+ ); + } +} \ No newline at end of file diff --git a/src/components/modals/settings/sections/Appearance.jsx b/src/components/modals/settings/sections/Appearance.jsx index 0b6878b8..7f16586c 100644 --- a/src/components/modals/settings/sections/Appearance.jsx +++ b/src/components/modals/settings/sections/Appearance.jsx @@ -7,10 +7,6 @@ export default function AppearanceSettings (props) {

Appearance

-

Accessibility

    diff --git a/src/components/modals/settings/sections/Experimental.jsx b/src/components/modals/settings/sections/Experimental.jsx new file mode 100644 index 00000000..c20d9f4d --- /dev/null +++ b/src/components/modals/settings/sections/Experimental.jsx @@ -0,0 +1,10 @@ +import React from 'react'; +import Checkbox from '../Checkbox'; + +export default function ExperimentalSettings (props) { + return ( +
    + +
    + ); +} \ No newline at end of file diff --git a/src/components/modals/tabs/Settings.jsx b/src/components/modals/tabs/Settings.jsx index 027fd62a..6163f6a8 100644 --- a/src/components/modals/tabs/Settings.jsx +++ b/src/components/modals/tabs/Settings.jsx @@ -8,6 +8,7 @@ import Time from '../settings/sections/Time'; import Quote from '../settings/sections/Quote'; import Appearance from '../settings/sections/Appearance'; import Background from '../settings/sections/Background'; +import Advanced from '../settings/sections/Advanced'; import SettingsTabs from './backend/Tabs'; @@ -35,6 +36,12 @@ export default function Settings (props) {
    +
    +
    + +
    +
    +
    diff --git a/src/components/modals/tabs/backend/Tab.jsx b/src/components/modals/tabs/backend/Tab.jsx index c76c9482..21492d7c 100644 --- a/src/components/modals/tabs/backend/Tab.jsx +++ b/src/components/modals/tabs/backend/Tab.jsx @@ -15,7 +15,9 @@ import Appearance from '@material-ui/icons/FormatPaint'; import Language from '@material-ui/icons/Translate'; import Changelog from '@material-ui/icons/NewReleasesRounded'; import About from '@material-ui/icons/Info'; +import Experimental from '@material-ui/icons/BugReport'; +// Store import Colors from '@material-ui/icons/ColorLens'; import Plugins from '@material-ui/icons/Widgets'; import Added from '@material-ui/icons/AddCircle'; @@ -54,7 +56,12 @@ export default class Tab extends React.PureComponent { case 'Language': icon = ; divider =

    ; - break; + break; + case 'Advanced': icon = ; break; + case 'Experimental': + icon = ; + divider =

    ; + break; case 'Change Log': icon = ; break; case 'About': icon = ; break; // Store diff --git a/src/scss/modules/_buttons.scss b/src/scss/modules/_buttons.scss index 5edd658b..7d93b91b 100644 --- a/src/scss/modules/_buttons.scss +++ b/src/scss/modules/_buttons.scss @@ -79,7 +79,6 @@ .export, .import { - float: right; margin-left: 20px; } diff --git a/src/scss/modules/_settings.scss b/src/scss/modules/_settings.scss index 86564f36..d0e18133 100644 --- a/src/scss/modules/_settings.scss +++ b/src/scss/modules/_settings.scss @@ -231,7 +231,7 @@ input[type=color]::-moz-color-swatch { font-size: 12px; } -#customcss { +#customcss, #customjs { font-family: Consolas !important; border: solid 1px black !important; margin-left: 0px;