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,
|
||||
PrivacyOptions,
|
||||
Final,
|
||||
} from './Sections';
|
||||
} from './components/Sections';
|
||||
|
||||
// WelcomeModal component
|
||||
function WelcomeModal({ modalClose, modalSkip }) {
|
||||
|
|
|
@ -3,7 +3,7 @@ import { MdOutlineOpenInNew } from 'react-icons/md';
|
|||
import languages from '@/i18n/languages.json';
|
||||
|
||||
import { Radio } from 'components/Form/Settings';
|
||||
import { Header, Content } from '../components/Layout';
|
||||
import { Header, Content } from '../Layout';
|
||||
|
||||
function ChooseLanguage() {
|
||||
return (
|
|
@ -1,6 +1,6 @@
|
|||
import variables from 'config/variables';
|
||||
import languages from '@/i18n/languages.json';
|
||||
import { Header, Content } from '../components/Layout';
|
||||
import { Header, Content } from '../Layout';
|
||||
|
||||
function Final(props) {
|
||||
return (
|
|
@ -3,7 +3,7 @@ import { useState } from 'react';
|
|||
import { FileUpload } from 'components/Form/Settings';
|
||||
import { MdCloudUpload } from 'react-icons/md';
|
||||
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';
|
||||
|
||||
function ImportSettings(props) {
|
|
@ -1,7 +1,7 @@
|
|||
import variables from 'config/variables';
|
||||
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 { FaDiscord, FaGithub } from 'react-icons/fa';
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import variables from 'config/variables';
|
||||
import { MdOutlineOpenInNew } from 'react-icons/md';
|
||||
import { Checkbox } from 'components/Form/Settings';
|
||||
import { Header, Content } from '../components/Layout';
|
||||
import { Header, Content } from '../Layout';
|
||||
|
||||
function OfflineMode() {
|
||||
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 { MdArchive, MdOutlineWhatshot } from 'react-icons/md';
|
||||
import { useState } from 'react';
|
||||
import { Header, Content } from '../components/Layout';
|
||||
import { Header, Content } from '../Layout';
|
||||
|
||||
const STYLES = {
|
||||
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 { MdAutoAwesome, MdLightMode, MdDarkMode } from 'react-icons/md';
|
||||
import { loadSettings } from 'utils/settings';
|
||||
import { Header, Content } from '../components/Layout';
|
||||
import { Header, Content } from '../Layout';
|
||||
|
||||
const THEMES = {
|
||||
AUTO: 'auto',
|
||||
|
@ -13,7 +13,6 @@ const THEMES = {
|
|||
function ThemeSelection() {
|
||||
const currentTheme = localStorage.getItem('theme') || THEMES.AUTO;
|
||||
const [theme, setTheme] = useState(currentTheme);
|
||||
|
||||
|
||||
const changeTheme = (type) => {
|
||||
setTheme(type);
|
||||
|
@ -46,7 +45,10 @@ function ThemeSelection() {
|
|||
subtitle={variables.getMessage('modals.welcome.sections.theme.description')}
|
||||
/>
|
||||
<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}
|
||||
<span>{themeMapping[THEMES.AUTO].text}</span>
|
||||
</div>
|
||||
|
@ -67,4 +69,4 @@ function ThemeSelection() {
|
|||
);
|
||||
}
|
||||
|
||||
export { ThemeSelection as default, ThemeSelection };
|
||||
export { ThemeSelection as default, ThemeSelection };
|
Loading…
Reference in New Issue