mirror of https://github.com/mue/mue.git
refactor(welcome): More conistent file structure
This commit is contained in:
parent
86f64dfc98
commit
920ba68108
|
@ -19,7 +19,7 @@ import {
|
||||||
StyleSelection,
|
StyleSelection,
|
||||||
PrivacyOptions,
|
PrivacyOptions,
|
||||||
Final,
|
Final,
|
||||||
} from './Sections';
|
} from './components/Sections';
|
||||||
|
|
||||||
// WelcomeModal component
|
// WelcomeModal component
|
||||||
function WelcomeModal({ modalClose, modalSkip }) {
|
function WelcomeModal({ modalClose, modalSkip }) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { MdOutlineOpenInNew } from 'react-icons/md';
|
||||||
import languages from '@/i18n/languages.json';
|
import languages from '@/i18n/languages.json';
|
||||||
|
|
||||||
import { Radio } from 'components/Form/Settings';
|
import { Radio } from 'components/Form/Settings';
|
||||||
import { Header, Content } from '../components/Layout';
|
import { Header, Content } from '../Layout';
|
||||||
|
|
||||||
function ChooseLanguage() {
|
function ChooseLanguage() {
|
||||||
return (
|
return (
|
|
@ -1,6 +1,6 @@
|
||||||
import variables from 'config/variables';
|
import variables from 'config/variables';
|
||||||
import languages from '@/i18n/languages.json';
|
import languages from '@/i18n/languages.json';
|
||||||
import { Header, Content } from '../components/Layout';
|
import { Header, Content } from '../Layout';
|
||||||
|
|
||||||
function Final(props) {
|
function Final(props) {
|
||||||
return (
|
return (
|
|
@ -3,7 +3,7 @@ import { useState } from 'react';
|
||||||
import { FileUpload } from 'components/Form/Settings';
|
import { FileUpload } from 'components/Form/Settings';
|
||||||
import { MdCloudUpload } from 'react-icons/md';
|
import { MdCloudUpload } from 'react-icons/md';
|
||||||
import { importSettings as importSettingsFunction } from 'utils/settings';
|
import { importSettings as importSettingsFunction } from 'utils/settings';
|
||||||
import { Header, Content } from '../components/Layout';
|
import { Header, Content } from '../Layout';
|
||||||
import default_settings from 'utils/data/default_settings.json';
|
import default_settings from 'utils/data/default_settings.json';
|
||||||
|
|
||||||
function ImportSettings(props) {
|
function ImportSettings(props) {
|
|
@ -1,7 +1,7 @@
|
||||||
import variables from 'config/variables';
|
import variables from 'config/variables';
|
||||||
import { useState, useEffect, useCallback } from 'react';
|
import { useState, useEffect, useCallback } from 'react';
|
||||||
|
|
||||||
import { Header, Content } from '../components/Layout';
|
import { Header, Content } from '../Layout';
|
||||||
import { MdOutlineWavingHand, MdOpenInNew } from 'react-icons/md';
|
import { MdOutlineWavingHand, MdOpenInNew } from 'react-icons/md';
|
||||||
import { FaDiscord, FaGithub } from 'react-icons/fa';
|
import { FaDiscord, FaGithub } from 'react-icons/fa';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import variables from 'config/variables';
|
import variables from 'config/variables';
|
||||||
import { MdOutlineOpenInNew } from 'react-icons/md';
|
import { MdOutlineOpenInNew } from 'react-icons/md';
|
||||||
import { Checkbox } from 'components/Form/Settings';
|
import { Checkbox } from 'components/Form/Settings';
|
||||||
import { Header, Content } from '../components/Layout';
|
import { Header, Content } from '../Layout';
|
||||||
|
|
||||||
function OfflineMode() {
|
function OfflineMode() {
|
||||||
return (
|
return (
|
||||||
|
@ -75,4 +75,4 @@ function PrivacyOptions() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { PrivacyOptions as default, PrivacyOptions };
|
export { PrivacyOptions as default, PrivacyOptions };
|
|
@ -1,7 +1,7 @@
|
||||||
import variables from 'config/variables';
|
import variables from 'config/variables';
|
||||||
import { MdArchive, MdOutlineWhatshot } from 'react-icons/md';
|
import { MdArchive, MdOutlineWhatshot } from 'react-icons/md';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Header, Content } from '../components/Layout';
|
import { Header, Content } from '../Layout';
|
||||||
|
|
||||||
const STYLES = {
|
const STYLES = {
|
||||||
NEW: 'new',
|
NEW: 'new',
|
||||||
|
@ -50,4 +50,4 @@ const StyleSelection = () => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export { StyleSelection as default, StyleSelection };
|
export { StyleSelection as default, StyleSelection };
|
|
@ -2,7 +2,7 @@ import variables from 'config/variables';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { MdAutoAwesome, MdLightMode, MdDarkMode } from 'react-icons/md';
|
import { MdAutoAwesome, MdLightMode, MdDarkMode } from 'react-icons/md';
|
||||||
import { loadSettings } from 'utils/settings';
|
import { loadSettings } from 'utils/settings';
|
||||||
import { Header, Content } from '../components/Layout';
|
import { Header, Content } from '../Layout';
|
||||||
|
|
||||||
const THEMES = {
|
const THEMES = {
|
||||||
AUTO: 'auto',
|
AUTO: 'auto',
|
||||||
|
@ -13,7 +13,6 @@ const THEMES = {
|
||||||
function ThemeSelection() {
|
function ThemeSelection() {
|
||||||
const currentTheme = localStorage.getItem('theme') || THEMES.AUTO;
|
const currentTheme = localStorage.getItem('theme') || THEMES.AUTO;
|
||||||
const [theme, setTheme] = useState(currentTheme);
|
const [theme, setTheme] = useState(currentTheme);
|
||||||
|
|
||||||
|
|
||||||
const changeTheme = (type) => {
|
const changeTheme = (type) => {
|
||||||
setTheme(type);
|
setTheme(type);
|
||||||
|
@ -46,7 +45,10 @@ function ThemeSelection() {
|
||||||
subtitle={variables.getMessage('modals.welcome.sections.theme.description')}
|
subtitle={variables.getMessage('modals.welcome.sections.theme.description')}
|
||||||
/>
|
/>
|
||||||
<div className="themesToggleArea">
|
<div className="themesToggleArea">
|
||||||
<div className={themeMapping[THEMES.AUTO].className} onClick={() => changeTheme(THEMES.AUTO)}>
|
<div
|
||||||
|
className={themeMapping[THEMES.AUTO].className}
|
||||||
|
onClick={() => changeTheme(THEMES.AUTO)}
|
||||||
|
>
|
||||||
{themeMapping[THEMES.AUTO].icon}
|
{themeMapping[THEMES.AUTO].icon}
|
||||||
<span>{themeMapping[THEMES.AUTO].text}</span>
|
<span>{themeMapping[THEMES.AUTO].text}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -67,4 +69,4 @@ function ThemeSelection() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { ThemeSelection as default, ThemeSelection };
|
export { ThemeSelection as default, ThemeSelection };
|
Loading…
Reference in New Issue