diff --git a/src/App.jsx b/src/App.jsx index 2781c7ca..9c491771 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -6,9 +6,9 @@ import Background from 'features/widgets/background/Background'; import Widgets from 'features/widgets/Widgets'; import Modals from 'features/modals/Modals'; -import { loadSettings, moveSettings } from 'modules/helpers/settings'; +import { loadSettings, moveSettings } from 'utils/helpers/settings'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; export default class App extends PureComponent { componentDidMount() { diff --git a/src/components/Form/Settings/Checkbox/Checkbox.jsx b/src/components/Form/Settings/Checkbox/Checkbox.jsx index f00d8f1b..e57eb017 100644 --- a/src/components/Form/Settings/Checkbox/Checkbox.jsx +++ b/src/components/Form/Settings/Checkbox/Checkbox.jsx @@ -2,7 +2,7 @@ import variables from 'config/variables'; import { PureComponent } from 'react'; import { Checkbox as CheckboxUI, FormControlLabel } from '@mui/material'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; class Checkbox extends PureComponent { constructor(props) { diff --git a/src/components/Form/Settings/Dropdown/Dropdown.jsx b/src/components/Form/Settings/Dropdown/Dropdown.jsx index 99baa2d0..9196e030 100644 --- a/src/components/Form/Settings/Dropdown/Dropdown.jsx +++ b/src/components/Form/Settings/Dropdown/Dropdown.jsx @@ -2,7 +2,7 @@ import variables from 'config/variables'; import { PureComponent, createRef } from 'react'; import { InputLabel, MenuItem, FormControl, Select } from '@mui/material'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; class Dropdown extends PureComponent { constructor(props) { diff --git a/src/components/Form/Settings/FileUpload/FileUpload.jsx b/src/components/Form/Settings/FileUpload/FileUpload.jsx index 302298ea..07aebd47 100644 --- a/src/components/Form/Settings/FileUpload/FileUpload.jsx +++ b/src/components/Form/Settings/FileUpload/FileUpload.jsx @@ -2,7 +2,7 @@ import variables from 'config/variables'; import { PureComponent } from 'react'; import { toast } from 'react-toastify'; import { compressAccurately, filetoDataURL } from 'image-conversion'; -import { videoCheck } from 'modules/helpers/background/widget'; +import { videoCheck } from 'utils/helpers/background/widget'; class FileUpload extends PureComponent { componentDidMount() { diff --git a/src/components/Form/Settings/Radio/Radio.jsx b/src/components/Form/Settings/Radio/Radio.jsx index 73ae4564..94376daa 100644 --- a/src/components/Form/Settings/Radio/Radio.jsx +++ b/src/components/Form/Settings/Radio/Radio.jsx @@ -8,8 +8,8 @@ import { FormLabel, } from '@mui/material'; -import EventBus from 'modules/helpers/eventbus'; -import { translations } from 'modules/translations'; +import EventBus from 'utils/helpers/eventbus'; +import { translations } from 'utils/translations'; class Radio extends PureComponent { constructor(props) { diff --git a/src/components/Form/Settings/Slider/Slider.jsx b/src/components/Form/Settings/Slider/Slider.jsx index d4773458..746da717 100644 --- a/src/components/Form/Settings/Slider/Slider.jsx +++ b/src/components/Form/Settings/Slider/Slider.jsx @@ -4,7 +4,7 @@ import { toast } from 'react-toastify'; import { Slider } from '@mui/material'; import { MdRefresh } from 'react-icons/md'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; class SliderComponent extends PureComponent { constructor(props) { diff --git a/src/components/Form/Settings/Switch/Switch.jsx b/src/components/Form/Settings/Switch/Switch.jsx index 8d354789..d51e3e5e 100644 --- a/src/components/Form/Settings/Switch/Switch.jsx +++ b/src/components/Form/Settings/Switch/Switch.jsx @@ -2,7 +2,7 @@ import variables from 'config/variables'; import { PureComponent } from 'react'; import { Switch as SwitchUI, FormControlLabel } from '@mui/material'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; class Switch extends PureComponent { constructor(props) { diff --git a/src/components/Form/Settings/Text/Text.jsx b/src/components/Form/Settings/Text/Text.jsx index fa1984dd..a46f69c3 100644 --- a/src/components/Form/Settings/Text/Text.jsx +++ b/src/components/Form/Settings/Text/Text.jsx @@ -4,7 +4,7 @@ import { toast } from 'react-toastify'; import { TextField } from '@mui/material'; import { MdRefresh } from 'react-icons/md'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; class Text extends PureComponent { constructor(props) { diff --git a/src/components/Layout/Settings/Header/Header.jsx b/src/components/Layout/Settings/Header/Header.jsx index 8ad522d5..f2ffe80b 100644 --- a/src/components/Layout/Settings/Header/Header.jsx +++ b/src/components/Layout/Settings/Header/Header.jsx @@ -6,7 +6,7 @@ import { MdOutlineVisibility, MdOutlineKeyboardArrowRight, } from 'react-icons/md'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import { Button } from 'components/Elements'; export const CustomActions = ({ children }) => { diff --git a/src/components/Layout/Settings/PreferencesWrapper/PreferencesWrapper.jsx b/src/components/Layout/Settings/PreferencesWrapper/PreferencesWrapper.jsx index 2ba4b110..93626393 100644 --- a/src/components/Layout/Settings/PreferencesWrapper/PreferencesWrapper.jsx +++ b/src/components/Layout/Settings/PreferencesWrapper/PreferencesWrapper.jsx @@ -3,8 +3,8 @@ import { Row, Content, Action } from '../Item/SettingsItem'; import variables from 'config/variables'; import Slider from '../../../Form/Settings/Slider/Slider'; -import { values } from 'modules/helpers/settings/modals'; -import EventBus from 'modules/helpers/eventbus'; +import { values } from 'utils/helpers/settings/modals'; +import EventBus from 'utils/helpers/eventbus'; const PreferencesWrapper = ({ children, ...props }) => { const [shown, setShown] = useState(localStorage.getItem(props.setting) === 'true'); diff --git a/src/config/variables.js b/src/config/variables.js index 16db4f9b..3df75543 100644 --- a/src/config/variables.js +++ b/src/config/variables.js @@ -1,5 +1,5 @@ import * as constants from 'config/constants'; -import Stats from 'modules/helpers/stats'; +import Stats from 'utils/helpers/stats'; const variables = { language: {}, diff --git a/src/features/helpers/autocomplete/Autocomplete.jsx b/src/features/helpers/autocomplete/Autocomplete.jsx index cd90b008..3ec3518f 100644 --- a/src/features/helpers/autocomplete/Autocomplete.jsx +++ b/src/features/helpers/autocomplete/Autocomplete.jsx @@ -1,6 +1,6 @@ import { PureComponent } from 'react'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import './autocomplete.scss'; diff --git a/src/features/modals/Modals.jsx b/src/features/modals/Modals.jsx index 88271e9a..f4a76fc7 100644 --- a/src/features/modals/Modals.jsx +++ b/src/features/modals/Modals.jsx @@ -6,7 +6,7 @@ import Main from './main/Main'; import Navbar from '../widgets/navbar/Navbar'; import Preview from '../helpers/preview/Preview'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import Welcome from './welcome/Welcome'; diff --git a/src/features/modals/main/marketplace/Item.jsx b/src/features/modals/main/marketplace/Item.jsx index b7371531..deec2e52 100644 --- a/src/features/modals/main/marketplace/Item.jsx +++ b/src/features/modals/main/marketplace/Item.jsx @@ -20,7 +20,7 @@ import Modal from 'react-modal'; import { Header } from 'components/Layout/Settings'; import { Button } from 'components/Elements'; -import { install, uninstall } from 'modules/helpers/marketplace'; +import { install, uninstall } from 'utils/helpers/marketplace'; import { ShareModal } from 'components/Elements'; diff --git a/src/features/modals/main/marketplace/sections/Added.jsx b/src/features/modals/main/marketplace/sections/Added.jsx index fa7c9acd..02c96804 100644 --- a/src/features/modals/main/marketplace/sections/Added.jsx +++ b/src/features/modals/main/marketplace/sections/Added.jsx @@ -12,7 +12,7 @@ import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown' import { Header, CustomActions } from 'components/Layout/Settings'; import { Button } from 'components/Elements'; -import { install, uninstall, urlParser } from 'modules/helpers/marketplace'; +import { install, uninstall, urlParser } from 'utils/helpers/marketplace'; export default class Added extends PureComponent { constructor() { diff --git a/src/features/modals/main/marketplace/sections/Marketplace.jsx b/src/features/modals/main/marketplace/sections/Marketplace.jsx index 55e22162..e416b6df 100644 --- a/src/features/modals/main/marketplace/sections/Marketplace.jsx +++ b/src/features/modals/main/marketplace/sections/Marketplace.jsx @@ -16,7 +16,7 @@ import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown' import { Header } from 'components/Layout/Settings'; import { Button } from 'components/Elements'; -import { install, urlParser, uninstall } from 'modules/helpers/marketplace'; +import { install, urlParser, uninstall } from 'utils/helpers/marketplace'; class Marketplace extends PureComponent { constructor() { diff --git a/src/features/modals/main/settings/ResetModal.jsx b/src/features/modals/main/settings/ResetModal.jsx index 97b18029..470c99e5 100644 --- a/src/features/modals/main/settings/ResetModal.jsx +++ b/src/features/modals/main/settings/ResetModal.jsx @@ -1,7 +1,7 @@ import { memo } from 'react'; import variables from 'config/variables'; import { MdClose, MdRestartAlt } from 'react-icons/md'; -import { setDefaultSettings } from 'modules/helpers/settings'; +import { setDefaultSettings } from 'utils/helpers/settings'; import { Tooltip } from 'components/Elements'; function ResetModal({ modalClose }) { const reset = () => { diff --git a/src/features/modals/main/settings/sections/About.jsx b/src/features/modals/main/settings/sections/About.jsx index 0c849d3a..33d5e98c 100644 --- a/src/features/modals/main/settings/sections/About.jsx +++ b/src/features/modals/main/settings/sections/About.jsx @@ -6,7 +6,7 @@ import { SiGithubsponsors, SiOpencollective } from 'react-icons/si'; import { BiDonateHeart } from 'react-icons/bi'; import { Tooltip } from 'components/Elements'; -import other_contributors from 'modules/other_contributors.json'; +import other_contributors from 'utils/data/other_contributors.json'; export default class About extends PureComponent { constructor() { diff --git a/src/features/modals/main/settings/sections/Advanced.jsx b/src/features/modals/main/settings/sections/Advanced.jsx index 047fa967..9d2ec216 100644 --- a/src/features/modals/main/settings/sections/Advanced.jsx +++ b/src/features/modals/main/settings/sections/Advanced.jsx @@ -8,7 +8,7 @@ import { MdDataUsage, } from 'react-icons/md'; -import { exportSettings, importSettings } from 'modules/helpers/settings/modals'; +import { exportSettings, importSettings } from 'utils/helpers/settings/modals'; import { FileUpload, Text, Switch, Dropdown } from 'components/Form/Settings'; import ResetModal from '../ResetModal'; diff --git a/src/features/modals/main/settings/sections/Appearance.jsx b/src/features/modals/main/settings/sections/Appearance.jsx index e147d724..d95c0743 100644 --- a/src/features/modals/main/settings/sections/Appearance.jsx +++ b/src/features/modals/main/settings/sections/Appearance.jsx @@ -7,7 +7,7 @@ import { Header, Section, Row, Content, Action } from 'components/Layout/Setting import { MdAccessibility } from 'react-icons/md'; -import { values } from 'modules/helpers/settings/modals'; +import { values } from 'utils/helpers/settings/modals'; function AppearanceSettings() { const [accessibility, setAccessibility] = useState(false); diff --git a/src/features/modals/main/settings/sections/Experimental.jsx b/src/features/modals/main/settings/sections/Experimental.jsx index 835a5d83..29727042 100644 --- a/src/features/modals/main/settings/sections/Experimental.jsx +++ b/src/features/modals/main/settings/sections/Experimental.jsx @@ -4,8 +4,8 @@ import Checkbox from '../../../../../components/Form/Settings/Checkbox/Checkbox' import Slider from '../../../../../components/Form/Settings/Slider/Slider'; import { TextField } from '@mui/material'; -import EventBus from 'modules/helpers/eventbus'; -import { values } from 'modules/helpers/settings/modals'; +import EventBus from 'utils/helpers/eventbus'; +import { values } from 'utils/helpers/settings/modals'; import { Row, Content, Action } from '../../../../../components/Layout/Settings/Item/SettingsItem'; diff --git a/src/features/modals/main/settings/sections/Message.jsx b/src/features/modals/main/settings/sections/Message.jsx index a1cdbdf3..4e516e26 100644 --- a/src/features/modals/main/settings/sections/Message.jsx +++ b/src/features/modals/main/settings/sections/Message.jsx @@ -5,7 +5,7 @@ import { toast } from 'react-toastify'; import { TextareaAutosize } from '@mui/material'; import { Header, Row, Content, Action, PreferencesWrapper } from 'components/Layout/Settings'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; export default class Message extends PureComponent { constructor() { diff --git a/src/features/modals/main/settings/sections/Navbar.jsx b/src/features/modals/main/settings/sections/Navbar.jsx index 941c10c4..a55495d2 100644 --- a/src/features/modals/main/settings/sections/Navbar.jsx +++ b/src/features/modals/main/settings/sections/Navbar.jsx @@ -13,7 +13,7 @@ import { Button } from 'components/Elements'; import { Row, Content, Action } from '../../../../../components/Layout/Settings/Item/SettingsItem'; import { Header } from 'components/Layout/Settings'; -import { getTitleFromUrl, isValidUrl } from 'modules/helpers/settings/modals'; +import { getTitleFromUrl, isValidUrl } from 'utils/helpers/settings/modals'; import QuickLink from './quicklinks/QuickLink'; function Navbar() { diff --git a/src/features/modals/main/settings/sections/Overview.jsx b/src/features/modals/main/settings/sections/Overview.jsx index ef1b1460..9b81b11b 100644 --- a/src/features/modals/main/settings/sections/Overview.jsx +++ b/src/features/modals/main/settings/sections/Overview.jsx @@ -11,7 +11,7 @@ import QuickLinks from './overview_skeletons/QuickLinks'; import Date from './overview_skeletons/Date'; import Message from './overview_skeletons/Message'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; const widget_name = { greeting: variables.getMessage('modals.main.settings.sections.greeting.title'), diff --git a/src/features/modals/main/settings/sections/QuickLinks.jsx b/src/features/modals/main/settings/sections/QuickLinks.jsx index 8c3d93b3..71463b2e 100644 --- a/src/features/modals/main/settings/sections/QuickLinks.jsx +++ b/src/features/modals/main/settings/sections/QuickLinks.jsx @@ -8,9 +8,9 @@ import Modal from 'react-modal'; import AddModal from './quicklinks/AddModal'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import QuickLink from './quicklinks/QuickLink'; -import { getTitleFromUrl, isValidUrl } from 'modules/helpers/settings/modals'; +import { getTitleFromUrl, isValidUrl } from 'utils/helpers/settings/modals'; export default class QuickLinks extends PureComponent { constructor() { diff --git a/src/features/modals/main/settings/sections/Quote.jsx b/src/features/modals/main/settings/sections/Quote.jsx index 5da3afa2..725ad371 100644 --- a/src/features/modals/main/settings/sections/Quote.jsx +++ b/src/features/modals/main/settings/sections/Quote.jsx @@ -14,7 +14,7 @@ import { import { Checkbox, Dropdown } from 'components/Form/Settings'; import { toast } from 'react-toastify'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; export default class QuoteSettings extends PureComponent { constructor() { diff --git a/src/features/modals/main/settings/sections/Search.jsx b/src/features/modals/main/settings/sections/Search.jsx index 4d146e0b..654c6d4b 100644 --- a/src/features/modals/main/settings/sections/Search.jsx +++ b/src/features/modals/main/settings/sections/Search.jsx @@ -6,7 +6,7 @@ import { MenuItem, TextField } from '@mui/material'; import { Header, Row, Content, Action, PreferencesWrapper } from 'components/Layout/Settings'; import { Dropdown, Checkbox } from 'components/Form/Settings'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import searchEngines from 'features/widgets/search/search_engines.json'; diff --git a/src/features/modals/main/settings/sections/Stats.jsx b/src/features/modals/main/settings/sections/Stats.jsx index 2baf932c..1d8bbf16 100644 --- a/src/features/modals/main/settings/sections/Stats.jsx +++ b/src/features/modals/main/settings/sections/Stats.jsx @@ -8,10 +8,10 @@ import { toast } from 'react-toastify'; import { Button } from 'components/Elements'; import { Header, CustomActions } from 'components/Layout/Settings'; -import { saveFile } from 'modules/helpers/settings/modals'; +import { saveFile } from 'utils/helpers/settings/modals'; -import achievementsData from 'modules/helpers/settings/achievements.json'; -import translations from 'modules/helpers/settings/achievement_translations/index'; +import achievementsData from 'utils/data/achievements.json'; +import translations from 'i18n/locales/achievements/index'; const achievementLanguage = { de_DE: translations.de_DE, diff --git a/src/features/modals/main/settings/sections/background/Background.jsx b/src/features/modals/main/settings/sections/background/Background.jsx index 2c866b0a..e6070a6e 100644 --- a/src/features/modals/main/settings/sections/background/Background.jsx +++ b/src/features/modals/main/settings/sections/background/Background.jsx @@ -19,7 +19,7 @@ import Text from '../../../../../../components/Form/Settings/Text/Text'; import ColourSettings from './Colour'; import CustomSettings from './Custom'; -import { values } from 'modules/helpers/settings/modals'; +import { values } from 'utils/helpers/settings/modals'; export default class BackgroundSettings extends PureComponent { constructor() { diff --git a/src/features/modals/main/settings/sections/background/Colour.jsx b/src/features/modals/main/settings/sections/background/Colour.jsx index bac05a8e..bfbf4a30 100644 --- a/src/features/modals/main/settings/sections/background/Colour.jsx +++ b/src/features/modals/main/settings/sections/background/Colour.jsx @@ -8,8 +8,8 @@ import { Action, } from '../../../../../../components/Layout/Settings/Item/SettingsItem'; -import hexToRgb from 'modules/helpers/background/hexToRgb'; -import rgbToHex from 'modules/helpers/background/rgbToHex'; +import hexToRgb from 'utils/helpers/background/hexToRgb'; +import rgbToHex from 'utils/helpers/background/rgbToHex'; //import '@muetab/react-color-gradient-picker/dist/index.css'; import '../../../scss/settings/react-color-picker-gradient-picker-custom-styles.scss'; diff --git a/src/features/modals/main/settings/sections/background/Custom.jsx b/src/features/modals/main/settings/sections/background/Custom.jsx index 5b8af1aa..332924e0 100644 --- a/src/features/modals/main/settings/sections/background/Custom.jsx +++ b/src/features/modals/main/settings/sections/background/Custom.jsx @@ -9,9 +9,9 @@ import { MdOutlineFileUpload, MdFolder, } from 'react-icons/md'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import { compressAccurately, filetoDataURL } from 'image-conversion'; -import { videoCheck } from 'modules/helpers/background/widget'; +import { videoCheck } from 'utils/helpers/background/widget'; import Checkbox from '../../../../../../components/Form/Settings/Checkbox/Checkbox'; import FileUpload from '../../../../../../components/Form/Settings/FileUpload/FileUpload'; diff --git a/src/features/modals/welcome/Sections/ImportSettings.jsx b/src/features/modals/welcome/Sections/ImportSettings.jsx index 01b5f1f2..1b371e21 100644 --- a/src/features/modals/welcome/Sections/ImportSettings.jsx +++ b/src/features/modals/welcome/Sections/ImportSettings.jsx @@ -2,9 +2,9 @@ import variables from 'config/variables'; import { useState } from 'react'; import { FileUpload } from 'components/Form/Settings'; import { MdCloudUpload } from 'react-icons/md'; -import { importSettings as importSettingsFunction } from 'modules/helpers/settings/modals'; +import { importSettings as importSettingsFunction } from 'utils/helpers/settings/modals'; import { Header } from '../components/Layout'; -import default_settings from 'modules/default_settings.json'; +import default_settings from 'utils/data/default_settings.json'; function ImportSettings(props) { const [importedSettings, setImportedSettings] = useState([]); diff --git a/src/features/modals/welcome/Sections/ThemeSelection.jsx b/src/features/modals/welcome/Sections/ThemeSelection.jsx index 0bc5321b..b649de8b 100644 --- a/src/features/modals/welcome/Sections/ThemeSelection.jsx +++ b/src/features/modals/welcome/Sections/ThemeSelection.jsx @@ -1,7 +1,7 @@ import variables from 'config/variables'; import { useState } from 'react'; import { MdAutoAwesome, MdLightMode, MdDarkMode } from 'react-icons/md'; -import { loadSettings } from 'modules/helpers/settings'; +import { loadSettings } from 'utils/helpers/settings'; import { Header } from '../components/Layout'; function ThemeSelection() { diff --git a/src/features/modals/welcome/Welcome.jsx b/src/features/modals/welcome/Welcome.jsx index 227a6b85..e086844c 100644 --- a/src/features/modals/welcome/Welcome.jsx +++ b/src/features/modals/welcome/Welcome.jsx @@ -2,7 +2,7 @@ import variables from 'config/variables'; import { PureComponent } from 'react'; import { MdArrowBackIosNew, MdArrowForwardIos, MdOutlinePreview } from 'react-icons/md'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import { ProgressBar } from './components/Elements'; import { Button } from 'components/Elements'; diff --git a/src/features/modals/welcome/WelcomeSections.jsx b/src/features/modals/welcome/WelcomeSections.jsx index bcea9f67..ba770883 100644 --- a/src/features/modals/welcome/WelcomeSections.jsx +++ b/src/features/modals/welcome/WelcomeSections.jsx @@ -15,10 +15,10 @@ import { import { FaDiscord, FaGithub } from 'react-icons/fa'; import { Radio, Checkbox, FileUpload } from 'components/Form/Settings'; -import { loadSettings } from 'modules/helpers/settings'; -import { importSettings } from 'modules/helpers/settings/modals'; +import { loadSettings } from 'utils/helpers/settings'; +import { importSettings } from 'utils/helpers/settings/modals'; -import default_settings from 'modules/default_settings.json'; +import default_settings from 'utils/data/default_settings.json'; import languages from '@/i18n/languages.json'; class WelcomeSections extends PureComponent { diff --git a/src/features/widgets/Widgets.jsx b/src/features/widgets/Widgets.jsx index 66fc0708..e83a3ea3 100644 --- a/src/features/widgets/Widgets.jsx +++ b/src/features/widgets/Widgets.jsx @@ -9,7 +9,7 @@ import Date from './time/Date'; import Message from './message/Message'; import { WidgetsLayout } from 'components/Layout'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; // weather is lazy loaded due to the size of the weather icons module // since we're using react-icons this might not be accurate, diff --git a/src/features/widgets/background/Background.jsx b/src/features/widgets/background/Background.jsx index 4b9e3374..317824d7 100644 --- a/src/features/widgets/background/Background.jsx +++ b/src/features/widgets/background/Background.jsx @@ -5,17 +5,17 @@ import { PureComponent } from 'react'; import PhotoInformation from './PhotoInformation'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import { videoCheck, offlineBackground, getGradient, randomColourStyleBuilder, -} from 'modules/helpers/background/widget'; +} from 'utils/helpers/background/widget'; import './scss/index.scss'; import { decodeBlurHash } from 'fast-blurhash'; -import { supportsAVIF } from 'modules/helpers/background/avif'; +import { supportsAVIF } from 'utils/helpers/background/avif'; export default class Background extends PureComponent { constructor() { diff --git a/src/features/widgets/background/ExcludeModal.jsx b/src/features/widgets/background/ExcludeModal.jsx index 85b50814..79384ec3 100644 --- a/src/features/widgets/background/ExcludeModal.jsx +++ b/src/features/widgets/background/ExcludeModal.jsx @@ -1,6 +1,6 @@ import variables from 'config/variables'; import { memo } from 'react'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import { Tooltip } from 'components/Elements'; import { MdClose, MdDone } from 'react-icons/md'; diff --git a/src/features/widgets/greeting/Greeting.jsx b/src/features/widgets/greeting/Greeting.jsx index bde1295a..e6f9bc26 100644 --- a/src/features/widgets/greeting/Greeting.jsx +++ b/src/features/widgets/greeting/Greeting.jsx @@ -1,8 +1,8 @@ import variables from 'config/variables'; import { PureComponent, createRef } from 'react'; -import { nth, convertTimezone } from 'modules/helpers/date'; -import EventBus from 'modules/helpers/eventbus'; +import { nth, convertTimezone } from 'utils/helpers/date'; +import EventBus from 'utils/helpers/eventbus'; import './greeting.scss'; diff --git a/src/features/widgets/message/Message.jsx b/src/features/widgets/message/Message.jsx index 9307ea6e..71614f6d 100644 --- a/src/features/widgets/message/Message.jsx +++ b/src/features/widgets/message/Message.jsx @@ -1,5 +1,5 @@ import { useState, useEffect, useRef } from 'react'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import './message.scss'; const Message = () => { diff --git a/src/features/widgets/navbar/Apps.jsx b/src/features/widgets/navbar/Apps.jsx index 68f4e1ad..b1b7acc5 100644 --- a/src/features/widgets/navbar/Apps.jsx +++ b/src/features/widgets/navbar/Apps.jsx @@ -6,7 +6,7 @@ import { MdPlaylistRemove, MdOutlineApps } from 'react-icons/md'; import { Tooltip } from 'components/Elements'; import { shift, useFloating } from '@floating-ui/react-dom'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; class Apps extends PureComponent { constructor() { diff --git a/src/features/widgets/navbar/Navbar.jsx b/src/features/widgets/navbar/Navbar.jsx index ccceabc1..395c4fb0 100644 --- a/src/features/widgets/navbar/Navbar.jsx +++ b/src/features/widgets/navbar/Navbar.jsx @@ -8,7 +8,7 @@ import Todo from './Todo'; import Apps from './Apps'; import Maximise from '../background/Maximise'; import { Tooltip } from 'components/Elements'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import './scss/index.scss'; diff --git a/src/features/widgets/navbar/Notes.jsx b/src/features/widgets/navbar/Notes.jsx index 42fe1104..20f8d7d2 100644 --- a/src/features/widgets/navbar/Notes.jsx +++ b/src/features/widgets/navbar/Notes.jsx @@ -7,8 +7,8 @@ import TextareaAutosize from '@mui/material/TextareaAutosize'; import { toast } from 'react-toastify'; import { Tooltip } from 'components/Elements'; -import { saveFile } from 'modules/helpers/settings/modals'; -import EventBus from 'modules/helpers/eventbus'; +import { saveFile } from 'utils/helpers/settings/modals'; +import EventBus from 'utils/helpers/eventbus'; class Notes extends PureComponent { constructor() { diff --git a/src/features/widgets/navbar/Todo.jsx b/src/features/widgets/navbar/Todo.jsx index 11fe8046..25130cf4 100644 --- a/src/features/widgets/navbar/Todo.jsx +++ b/src/features/widgets/navbar/Todo.jsx @@ -15,7 +15,7 @@ import { Tooltip } from 'components/Elements'; import Checkbox from '@mui/material/Checkbox'; import { shift, useFloating } from '@floating-ui/react-dom'; import { sortableContainer, sortableElement, sortableHandle } from '@muetab/react-sortable-hoc'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; const SortableItem = sortableElement(({ value }) =>
{value}
); const SortableContainer = sortableContainer(({ children }) =>
{children}
); diff --git a/src/features/widgets/quicklinks/QuickLinks.jsx b/src/features/widgets/quicklinks/QuickLinks.jsx index cff5b8b1..438bbb95 100644 --- a/src/features/widgets/quicklinks/QuickLinks.jsx +++ b/src/features/widgets/quicklinks/QuickLinks.jsx @@ -1,7 +1,7 @@ import { PureComponent, createRef } from 'react'; import { Tooltip } from 'components/Elements'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import './quicklinks.scss'; diff --git a/src/features/widgets/quote/Quote.jsx b/src/features/widgets/quote/Quote.jsx index 49b37c93..a15f79f3 100644 --- a/src/features/widgets/quote/Quote.jsx +++ b/src/features/widgets/quote/Quote.jsx @@ -18,7 +18,7 @@ import { ShareModal } from 'components/Elements'; import offline_quotes from './offline_quotes.json'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import './quote.scss'; diff --git a/src/features/widgets/search/Search.jsx b/src/features/widgets/search/Search.jsx index 897fde51..1350748f 100644 --- a/src/features/widgets/search/Search.jsx +++ b/src/features/widgets/search/Search.jsx @@ -7,7 +7,7 @@ import { FaYandex } from 'react-icons/fa'; import { Tooltip } from 'components/Elements'; import AutocompleteInput from 'features/helpers/autocomplete/Autocomplete'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import './search.scss'; diff --git a/src/features/widgets/time/Clock.jsx b/src/features/widgets/time/Clock.jsx index 9657f315..069b8408 100644 --- a/src/features/widgets/time/Clock.jsx +++ b/src/features/widgets/time/Clock.jsx @@ -1,7 +1,7 @@ import { PureComponent, Suspense, lazy } from 'react'; -import { convertTimezone } from 'modules/helpers/date'; -import EventBus from 'modules/helpers/eventbus'; +import { convertTimezone } from 'utils/helpers/date'; +import EventBus from 'utils/helpers/eventbus'; import './clock.scss'; diff --git a/src/features/widgets/time/Date.jsx b/src/features/widgets/time/Date.jsx index 29ae1223..968c980c 100644 --- a/src/features/widgets/time/Date.jsx +++ b/src/features/widgets/time/Date.jsx @@ -1,8 +1,8 @@ import variables from 'config/variables'; import { PureComponent, createRef } from 'react'; -import { nth, convertTimezone } from '../../../modules/helpers/date'; -import EventBus from 'modules/helpers/eventbus'; +import { nth, convertTimezone } from 'utils/helpers/date'; +import EventBus from 'utils/helpers/eventbus'; import './date.scss'; diff --git a/src/features/widgets/weather/Weather.jsx b/src/features/widgets/weather/Weather.jsx index 64399e2f..c976a834 100644 --- a/src/features/widgets/weather/Weather.jsx +++ b/src/features/widgets/weather/Weather.jsx @@ -4,7 +4,7 @@ import { PureComponent } from 'react'; import WeatherIcon from './WeatherIcon'; import Expanded from './Expanded'; -import EventBus from 'modules/helpers/eventbus'; +import EventBus from 'utils/helpers/eventbus'; import './weather.scss'; diff --git a/src/modules/helpers/settings/achievement_translations/bn.json b/src/i18n/locales/achievements/bn.json similarity index 100% rename from src/modules/helpers/settings/achievement_translations/bn.json rename to src/i18n/locales/achievements/bn.json diff --git a/src/modules/helpers/settings/achievement_translations/de_DE.json b/src/i18n/locales/achievements/de_DE.json similarity index 100% rename from src/modules/helpers/settings/achievement_translations/de_DE.json rename to src/i18n/locales/achievements/de_DE.json diff --git a/src/modules/helpers/settings/achievement_translations/en_GB.json b/src/i18n/locales/achievements/en_GB.json similarity index 100% rename from src/modules/helpers/settings/achievement_translations/en_GB.json rename to src/i18n/locales/achievements/en_GB.json diff --git a/src/modules/helpers/settings/achievement_translations/en_US.json b/src/i18n/locales/achievements/en_US.json similarity index 100% rename from src/modules/helpers/settings/achievement_translations/en_US.json rename to src/i18n/locales/achievements/en_US.json diff --git a/src/modules/helpers/settings/achievement_translations/es.json b/src/i18n/locales/achievements/es.json similarity index 100% rename from src/modules/helpers/settings/achievement_translations/es.json rename to src/i18n/locales/achievements/es.json diff --git a/src/modules/helpers/settings/achievement_translations/fr.json b/src/i18n/locales/achievements/fr.json similarity index 100% rename from src/modules/helpers/settings/achievement_translations/fr.json rename to src/i18n/locales/achievements/fr.json diff --git a/src/modules/helpers/settings/achievement_translations/id_ID.json b/src/i18n/locales/achievements/id_ID.json similarity index 100% rename from src/modules/helpers/settings/achievement_translations/id_ID.json rename to src/i18n/locales/achievements/id_ID.json diff --git a/src/modules/helpers/settings/achievement_translations/index.js b/src/i18n/locales/achievements/index.js similarity index 100% rename from src/modules/helpers/settings/achievement_translations/index.js rename to src/i18n/locales/achievements/index.js diff --git a/src/modules/helpers/settings/achievement_translations/nl.json b/src/i18n/locales/achievements/nl.json similarity index 100% rename from src/modules/helpers/settings/achievement_translations/nl.json rename to src/i18n/locales/achievements/nl.json diff --git a/src/modules/helpers/settings/achievement_translations/no.json b/src/i18n/locales/achievements/no.json similarity index 100% rename from src/modules/helpers/settings/achievement_translations/no.json rename to src/i18n/locales/achievements/no.json diff --git a/src/modules/helpers/settings/achievement_translations/pt_BR.json b/src/i18n/locales/achievements/pt_BR.json similarity index 100% rename from src/modules/helpers/settings/achievement_translations/pt_BR.json rename to src/i18n/locales/achievements/pt_BR.json diff --git a/src/modules/helpers/settings/achievement_translations/ru.json b/src/i18n/locales/achievements/ru.json similarity index 100% rename from src/modules/helpers/settings/achievement_translations/ru.json rename to src/i18n/locales/achievements/ru.json diff --git a/src/modules/helpers/settings/achievement_translations/tr_TR.json b/src/i18n/locales/achievements/tr_TR.json similarity index 100% rename from src/modules/helpers/settings/achievement_translations/tr_TR.json rename to src/i18n/locales/achievements/tr_TR.json diff --git a/src/modules/helpers/settings/achievement_translations/zh_CN.json b/src/i18n/locales/achievements/zh_CN.json similarity index 100% rename from src/modules/helpers/settings/achievement_translations/zh_CN.json rename to src/i18n/locales/achievements/zh_CN.json diff --git a/src/index.jsx b/src/index.jsx index c29d2565..bde8ee74 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -10,7 +10,7 @@ import './scss/index.scss'; // the toast css is based on default so we need to import it import 'react-toastify/dist/ReactToastify.min.css'; -import { initTranslations } from './modules/translations'; +import { initTranslations } from 'utils/translations'; const languagecode = localStorage.getItem('language') || 'en_GB'; variables.language = initTranslations(languagecode); diff --git a/src/modules/helpers/settings/achievements.json b/src/utils/data/achievements.json similarity index 100% rename from src/modules/helpers/settings/achievements.json rename to src/utils/data/achievements.json diff --git a/src/modules/default_settings.json b/src/utils/data/default_settings.json similarity index 100% rename from src/modules/default_settings.json rename to src/utils/data/default_settings.json diff --git a/src/modules/helpers/background/offlineImages.json b/src/utils/data/offline_images.json similarity index 100% rename from src/modules/helpers/background/offlineImages.json rename to src/utils/data/offline_images.json diff --git a/src/modules/other_contributors.json b/src/utils/data/other_contributors.json similarity index 100% rename from src/modules/other_contributors.json rename to src/utils/data/other_contributors.json diff --git a/src/modules/helpers/background/avif.js b/src/utils/helpers/background/avif.js similarity index 100% rename from src/modules/helpers/background/avif.js rename to src/utils/helpers/background/avif.js diff --git a/src/modules/helpers/background/hexToRgb.js b/src/utils/helpers/background/hexToRgb.js similarity index 100% rename from src/modules/helpers/background/hexToRgb.js rename to src/utils/helpers/background/hexToRgb.js diff --git a/src/utils/helpers/background/index.js b/src/utils/helpers/background/index.js new file mode 100644 index 00000000..e69de29b diff --git a/src/modules/helpers/background/rgbToHex.js b/src/utils/helpers/background/rgbToHex.js similarity index 100% rename from src/modules/helpers/background/rgbToHex.js rename to src/utils/helpers/background/rgbToHex.js diff --git a/src/modules/helpers/background/rgbToHsv.js b/src/utils/helpers/background/rgbToHsv.js similarity index 100% rename from src/modules/helpers/background/rgbToHsv.js rename to src/utils/helpers/background/rgbToHsv.js diff --git a/src/modules/helpers/background/setRgba.js b/src/utils/helpers/background/setRgba.js similarity index 100% rename from src/modules/helpers/background/setRgba.js rename to src/utils/helpers/background/setRgba.js diff --git a/src/modules/helpers/background/widget.js b/src/utils/helpers/background/widget.js similarity index 98% rename from src/modules/helpers/background/widget.js rename to src/utils/helpers/background/widget.js index b06d0eca..812a8060 100644 --- a/src/modules/helpers/background/widget.js +++ b/src/utils/helpers/background/widget.js @@ -1,5 +1,5 @@ // since there is so much code in the component, we have moved it to a separate file -import offlineImages from './offlineImages.json'; +import offlineImages from 'utils/data/offline_images.json'; /** * If the URL starts with `data:video/` or ends with `.mp4`, `.webm`, or `.ogg`, then it's a video. diff --git a/src/modules/helpers/date.js b/src/utils/helpers/date.js similarity index 100% rename from src/modules/helpers/date.js rename to src/utils/helpers/date.js diff --git a/src/modules/helpers/eventbus.js b/src/utils/helpers/eventbus.js similarity index 100% rename from src/modules/helpers/eventbus.js rename to src/utils/helpers/eventbus.js diff --git a/src/modules/helpers/experimental.js b/src/utils/helpers/experimental.js similarity index 100% rename from src/modules/helpers/experimental.js rename to src/utils/helpers/experimental.js diff --git a/src/modules/helpers/marketplace.js b/src/utils/helpers/marketplace.js similarity index 100% rename from src/modules/helpers/marketplace.js rename to src/utils/helpers/marketplace.js diff --git a/src/modules/helpers/settings/index.js b/src/utils/helpers/settings/index.js similarity index 99% rename from src/modules/helpers/settings/index.js rename to src/utils/helpers/settings/index.js index dbcdcb98..da9233ac 100644 --- a/src/modules/helpers/settings/index.js +++ b/src/utils/helpers/settings/index.js @@ -1,7 +1,7 @@ import variables from 'config/variables'; import experimentalInit from '../experimental'; -import defaultSettings from 'modules/default_settings.json'; +import defaultSettings from 'utils/data/default_settings.json'; import languages from '@/i18n/languages.json'; /** diff --git a/src/modules/helpers/settings/modals.js b/src/utils/helpers/settings/modals.js similarity index 100% rename from src/modules/helpers/settings/modals.js rename to src/utils/helpers/settings/modals.js diff --git a/src/modules/helpers/stats.js b/src/utils/helpers/stats.js similarity index 100% rename from src/modules/helpers/stats.js rename to src/utils/helpers/stats.js diff --git a/src/modules/translations.js b/src/utils/translations.js similarity index 100% rename from src/modules/translations.js rename to src/utils/translations.js diff --git a/vite.config.mjs b/vite.config.mjs index 0f26c652..c4dc61d8 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -98,9 +98,10 @@ export default defineConfig(({ command, mode }) => { extensions: ['.js', '.jsx'], alias: { '@': path.resolve(__dirname, './src'), + i18n: path.resolve(__dirname, './src/i18n'), features: path.resolve(__dirname, './src/features'), components: path.resolve(__dirname, './src/components'), - modules: path.resolve(__dirname, './src/modules'), + utils: path.resolve(__dirname, './src/utils'), translations: path.resolve(__dirname, './src/i18n/locales'), config: path.resolve(__dirname, './src/config'), scss: path.resolve(__dirname, './src/scss'),