diff --git a/src/components/modals/main/marketplace/sections/Create.jsx b/src/components/modals/main/marketplace/sections/Create.jsx index 7fa95cd6..ab9feb6b 100644 --- a/src/components/modals/main/marketplace/sections/Create.jsx +++ b/src/components/modals/main/marketplace/sections/Create.jsx @@ -16,6 +16,7 @@ import SettingsItem from '../../../main/settings/SettingsItem'; import { saveFile } from 'modules/helpers/settings/modals'; import InfoTooltip from '../../../../helpers/tooltip/infoTooltip'; +import Tooltip from '../../../../helpers/tooltip/Tooltip'; import FileUpload from '../../settings/FileUpload'; diff --git a/src/components/modals/main/settings/sections/advanced/Advanced.jsx b/src/components/modals/main/settings/sections/advanced/Advanced.jsx new file mode 100644 index 00000000..040377a0 --- /dev/null +++ b/src/components/modals/main/settings/sections/advanced/Advanced.jsx @@ -0,0 +1,158 @@ +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() { + const getMessage = (text) => variables.language.getMessage(variables.languagecode, text); + + if (this.state.showData) { + return this.setState({ showData: false })}/>; + } + + return ( + <> + + {getMessage('modals.main.settings.sections.advanced.title')} + + {localStorage.getItem('welcomePreview') !== 'true' ? ( +
this.setState({ showData: true })}> +
+ +
+ + {getMessage('modals.main.settings.sections.advanced.data')} + + + Sync, export, import etc your data. You have control, this is Mue. + +
+
+
+ {' '} + +
+
+ ) : null} + + + + {/* + {localStorage.getItem('welcomePreview') !== 'true' ? ( +
+
+ + {getMessage('modals.main.settings.sections.advanced.data')} + + + Choose whether to export your Mue settings to your computer, import an existing + settings file, or reset your settings to their default values. + +
+
+ + + +
+
+ ) : null} + */} + + + + {getMessage('modals.main.settings.sections.advanced.timezone.automatic')} + + {time_zones.map((timezone) => ( + + {timezone} + + ))} + + + + + + importSettings(e)} + /> + + + + + + + this.setState({ resetModal: false })} + isOpen={this.state.resetModal} + className="Modal resetmodal mainModal" + overlayClassName="Overlay resetoverlay" + ariaHideApp={false} + > + this.setState({ resetModal: false })} /> + + + ); + } +} diff --git a/src/components/modals/main/settings/sections/advanced/Data.jsx b/src/components/modals/main/settings/sections/advanced/Data.jsx new file mode 100644 index 00000000..81719848 --- /dev/null +++ b/src/components/modals/main/settings/sections/advanced/Data.jsx @@ -0,0 +1,59 @@ +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() { + const getMessage = (text) => variables.language.getMessage(variables.languagecode, text); + + return ( + <> + this.props.goBack()}> + {getMessage('modals.main.settings.sections.advanced.title')} + Data + +
+ + Sync + {/*Last synced at: Sun 10:12PM, 1st May 2022*/} + Sync is not setup yet. +
+
+
+ + {getMessage('modals.main.settings.sections.advanced.data')} + + + Choose whether to export your Mue settings to your computer, import an existing + settings file, or reset your settings to their default values. + +
+
+ + + +
+
+ + + + + ); + } +} diff --git a/src/components/modals/main/settings/sections/background/Background.jsx b/src/components/modals/main/settings/sections/background/Background.jsx index 44f860b7..becfa0d5 100644 --- a/src/components/modals/main/settings/sections/background/Background.jsx +++ b/src/components/modals/main/settings/sections/background/Background.jsx @@ -208,6 +208,18 @@ export default class BackgroundSettings extends PureComponent { this.state.backgroundType !== 'random_colour' && this.state.backgroundType !== 'random_gradient'; + const breadcrumb = (name, toSet) => ( +
+
this.setState({ [toSet]: false })}> + + + +
+ {name} +
+ ); + + return ( <>
{this.state.effects ? ( - <> -
-
this.setState({ effects: false })}> - - - -
- effects -
- + breadcrumb('Effects', 'effects') ) : null} {this.state.backgroundSettingsSection ? ( -
-
this.setState({ backgroundSettingsSection: false })}> - - - -
- Source -
+ breadcrumb('Source', 'backgroundSettingsSection') ) : null} - {(this.state.backgroundSettingsSection !== true && this.state.effects !== true) ? ( + {this.state.backgroundSettingsSection !== true && this.state.effects !== true ? ( <>
Add effects to the background image
-
+
+ {' '} + +
) : null} diff --git a/src/components/modals/main/tabs/Settings.jsx b/src/components/modals/main/tabs/Settings.jsx index e5448fcc..7e5edffd 100644 --- a/src/components/modals/main/tabs/Settings.jsx +++ b/src/components/modals/main/tabs/Settings.jsx @@ -15,7 +15,7 @@ import Weather from '../settings/sections/Weather'; import Order from '../settings/sections/Order'; import Appearance from '../settings/sections/Appearance'; import Language from '../settings/sections/Language'; -import Advanced from '../settings/sections/Advanced'; +import Advanced from '../settings/sections/advanced/Advanced'; //import Keybinds from '../settings/sections/Keybinds'; import Stats from '../settings/sections/Stats'; import Experimental from '../settings/sections/Experimental'; diff --git a/src/components/widgets/reminder/Reminder.jsx b/src/components/widgets/reminder/Reminder.jsx index b8f1822f..989f963a 100644 --- a/src/components/widgets/reminder/Reminder.jsx +++ b/src/components/widgets/reminder/Reminder.jsx @@ -1,10 +1,10 @@ -import React from 'react'; +import { PureComponent } from 'react'; import './reminder.scss'; import Tooltip from '../../helpers/tooltip/Tooltip'; import { MdClose, MdSnooze, MdWork } from 'react-icons/md'; -export default class Reminder extends React.PureComponent { +export default class Reminder extends PureComponent { render() { return (
diff --git a/src/scss/_variables.scss b/src/scss/_variables.scss index eb1132df..b57d961c 100644 --- a/src/scss/_variables.scss +++ b/src/scss/_variables.scss @@ -117,6 +117,8 @@ $themes: ( %tabText { .mainTitle { + display: flex; + align-items: center; font-size: 38px; font-weight: 600; margin-bottom: 15px;