diff --git a/src/components/ExtensionCard.tsx b/src/components/ExtensionCard.tsx index d386d82e5b..bfbf5f7eaa 100644 --- a/src/components/ExtensionCard.tsx +++ b/src/components/ExtensionCard.tsx @@ -15,7 +15,7 @@ import Typography from '@mui/material/Typography'; import { Box } from '@mui/material'; import { useTranslation } from 'react-i18next'; import { IExtension, TranslationKey } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; interface IProps { extension: IExtension; diff --git a/src/components/MangaCard.tsx b/src/components/MangaCard.tsx index 15c9d45fe6..892b1751b9 100644 --- a/src/components/MangaCard.tsx +++ b/src/components/MangaCard.tsx @@ -13,7 +13,7 @@ import { Link } from 'react-router-dom'; import { Avatar, Box, CardContent, styled } from '@mui/material'; import { useTranslation } from 'react-i18next'; import { IMangaCard } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import { GridLayout, useLibraryOptionsContext } from '@/components/context/LibraryOptionsContext'; import SpinnerImage from '@/components/util/SpinnerImage'; diff --git a/src/components/SourceCard.tsx b/src/components/SourceCard.tsx index 9b0c956185..d779de44fa 100644 --- a/src/components/SourceCard.tsx +++ b/src/components/SourceCard.tsx @@ -16,7 +16,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router-dom'; import { ISource } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import { translateExtensionLanguage } from '@/screens/util/Extensions'; import { SourceContentType } from '@/screens/SourceMangas'; diff --git a/src/components/library/UpdateChecker.tsx b/src/components/library/UpdateChecker.tsx index dada41fe4f..b03b8842b8 100644 --- a/src/components/library/UpdateChecker.tsx +++ b/src/components/library/UpdateChecker.tsx @@ -14,7 +14,7 @@ import { Box } from '@mui/material'; import Typography from '@mui/material/Typography'; import { useTranslation } from 'react-i18next'; import { IUpdateStatus } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import makeToast from '@/components/util/Toast'; interface IProgressProps { diff --git a/src/components/library/useSubscription.ts b/src/components/library/useSubscription.ts index 5c21f1dd0c..0ddc3a637e 100644 --- a/src/components/library/useSubscription.ts +++ b/src/components/library/useSubscription.ts @@ -7,7 +7,7 @@ */ import { useEffect, useState } from 'react'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; const useSubscription = (path: string, callback?: (newValue: T) => boolean | void) => { const [state, setState] = useState(); diff --git a/src/components/manga/ChapterCard.tsx b/src/components/manga/ChapterCard.tsx index e6e492c4a2..072c3caf59 100644 --- a/src/components/manga/ChapterCard.tsx +++ b/src/components/manga/ChapterCard.tsx @@ -28,7 +28,7 @@ import React from 'react'; import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { IChapter, IDownloadChapter } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import { getUploadDateString } from '@/util/date'; import DownloadStateIndicator from '@/components/molecules/DownloadStateIndicator'; diff --git a/src/components/manga/ChapterList.tsx b/src/components/manga/ChapterList.tsx index 1514bcce8d..1d76f5a5f6 100644 --- a/src/components/manga/ChapterList.tsx +++ b/src/components/manga/ChapterList.tsx @@ -12,7 +12,7 @@ import React, { ComponentProps, useEffect, useMemo, useRef, useState } from 'rea import { Virtuoso } from 'react-virtuoso'; import { useTranslation } from 'react-i18next'; import { BatchChaptersChange, IChapter, IDownloadChapter, IQueue, TranslationKey } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import useSubscription from '@/components/library/useSubscription'; import ChapterCard from '@/components/manga/ChapterCard'; import ResumeFab from '@/components/manga/ResumeFAB'; diff --git a/src/components/manga/MangaDetails.tsx b/src/components/manga/MangaDetails.tsx index 85767253df..4fa4a12595 100644 --- a/src/components/manga/MangaDetails.tsx +++ b/src/components/manga/MangaDetails.tsx @@ -16,7 +16,7 @@ import { mutate } from 'swr'; import { t as translate } from 'i18next'; import Button from '@mui/material/Button'; import { IManga, ISource } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import makeToast from '@/components/util/Toast'; const DetailsWrapper = styled('div')(({ theme }) => ({ diff --git a/src/components/manga/hooks.ts b/src/components/manga/hooks.ts index 0edbefb0b4..2bc45b700a 100644 --- a/src/components/manga/hooks.ts +++ b/src/components/manga/hooks.ts @@ -8,7 +8,7 @@ import { useCallback, useEffect, useState } from 'react'; import { mutate } from 'swr'; -import requestManager, { RequestManager } from '@/lib/RequestManager'; +import requestManager, { RequestManager } from '@/lib/requests/RequestManager.ts'; export const useRefreshManga = (mangaId: string) => { const [fetchingOnline, setFetchingOnline] = useState(false); diff --git a/src/components/navbar/action/CategorySelect.tsx b/src/components/navbar/action/CategorySelect.tsx index 3a56f8af61..218e58a6d4 100644 --- a/src/components/navbar/action/CategorySelect.tsx +++ b/src/components/navbar/action/CategorySelect.tsx @@ -16,7 +16,7 @@ import Checkbox from '@mui/material/Checkbox'; import FormControlLabel from '@mui/material/FormControlLabel'; import FormGroup from '@mui/material/FormGroup'; import { useTranslation } from 'react-i18next'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; interface IProps { open: boolean; diff --git a/src/lib/RequestManager.ts b/src/lib/requests/RequestManager.ts similarity index 99% rename from src/lib/RequestManager.ts rename to src/lib/requests/RequestManager.ts index 8a2e34e2f2..ec62ae01c9 100644 --- a/src/lib/RequestManager.ts +++ b/src/lib/requests/RequestManager.ts @@ -28,9 +28,9 @@ import { SourcePreferences, SourceSearchResult, UpdateCheck, -} from '@/typings'; -import { HttpMethod as DefaultHttpMethod, IRestClient, RestClient } from '@/lib/RestClient'; -import storage from '@/util/localStorage'; +} from '@/typings.ts'; +import { HttpMethod as DefaultHttpMethod, IRestClient, RestClient } from '@/lib/RestClient.ts'; +import storage from '@/util/localStorage.tsx'; enum SWRHttpMethod { SWR_GET, diff --git a/src/screens/DownloadQueue.tsx b/src/screens/DownloadQueue.tsx index ea76fab47f..adbb469f8a 100644 --- a/src/screens/DownloadQueue.tsx +++ b/src/screens/DownloadQueue.tsx @@ -19,7 +19,7 @@ import Typography from '@mui/material/Typography'; import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { IChapter, IQueue } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import StrictModeDroppable from '@/lib/StrictModeDroppable'; import makeToast from '@/components/util/Toast'; import { NavbarToolbar } from '@/components/navbar/DefaultNavBar'; diff --git a/src/screens/Extensions.tsx b/src/screens/Extensions.tsx index 62ef028e3b..e0dddc8101 100644 --- a/src/screens/Extensions.tsx +++ b/src/screens/Extensions.tsx @@ -15,7 +15,7 @@ import { Virtuoso } from 'react-virtuoso'; import { Typography, useMediaQuery, useTheme } from '@mui/material'; import { useTranslation } from 'react-i18next'; import { IExtension } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import { extensionDefaultLangs, DefaultLanguage, langSortCmp } from '@/util/language'; import useLocalStorage from '@/util/useLocalStorage'; import { diff --git a/src/screens/Library.tsx b/src/screens/Library.tsx index b0539cec0f..b6722da2d7 100644 --- a/src/screens/Library.tsx +++ b/src/screens/Library.tsx @@ -10,7 +10,7 @@ import { Chip, Tab, Tabs, styled, Box } from '@mui/material'; import React, { useContext, useEffect, useMemo, useState } from 'react'; import { useQueryParam, NumberParam } from 'use-query-params'; import { useTranslation } from 'react-i18next'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import NavbarContext from '@/components/context/NavbarContext'; import EmptyView from '@/components/util/EmptyView'; import LoadingPlaceholder from '@/components/util/LoadingPlaceholder'; diff --git a/src/screens/Manga.tsx b/src/screens/Manga.tsx index 3660c23c28..af6b0e58e1 100644 --- a/src/screens/Manga.tsx +++ b/src/screens/Manga.tsx @@ -11,7 +11,7 @@ import { CircularProgress, IconButton, Stack, Tooltip, Box } from '@mui/material import React, { useContext, useEffect, useRef } from 'react'; import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import NavbarContext, { useSetDefaultBackTo } from '@/components/context/NavbarContext'; import ChapterList from '@/components/manga/ChapterList'; import { useRefreshManga } from '@/components/manga/hooks'; diff --git a/src/screens/Reader.tsx b/src/screens/Reader.tsx index 4d19b7987d..ac2489f53e 100644 --- a/src/screens/Reader.tsx +++ b/src/screens/Reader.tsx @@ -12,7 +12,7 @@ import { useLocation, useNavigate, useParams } from 'react-router-dom'; import { Box } from '@mui/material'; import { useTranslation } from 'react-i18next'; import { ChapterOffset, IChapter, IManga, IMangaCard, IReaderSettings, ReaderType, TranslationKey } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import { checkAndHandleMissingStoredReaderSettings, getReaderSettingsFor, diff --git a/src/screens/SearchAll.tsx b/src/screens/SearchAll.tsx index 7f88c98886..78f27d3ab6 100644 --- a/src/screens/SearchAll.tsx +++ b/src/screens/SearchAll.tsx @@ -12,7 +12,7 @@ import { Link } from 'react-router-dom'; import { StringParam, useQueryParam } from 'use-query-params'; import { useTranslation } from 'react-i18next'; import { ISource } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import useLocalStorage from '@/util/useLocalStorage'; import { langSortCmp, sourceDefualtLangs, sourceForcedDefaultLangs } from '@/util/language'; import { translateExtensionLanguage } from '@/screens/util/Extensions'; diff --git a/src/screens/Settings.tsx b/src/screens/Settings.tsx index d38bcb007f..8cc66045a4 100644 --- a/src/screens/Settings.tsx +++ b/src/screens/Settings.tsx @@ -35,7 +35,7 @@ import ViewModuleIcon from '@mui/icons-material/ViewModule'; import { useTranslation } from 'react-i18next'; import LanguageIcon from '@mui/icons-material/Language'; import CollectionsOutlinedBookmarkIcon from '@mui/icons-material/CollectionsBookmarkOutlined'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import { langCodeToName } from '@/util/language'; import useLocalStorage from '@/util/useLocalStorage'; import ListItemLink from '@/components/util/ListItemLink'; diff --git a/src/screens/SourceConfigure.tsx b/src/screens/SourceConfigure.tsx index 0b761c663d..9fc74c3dc4 100644 --- a/src/screens/SourceConfigure.tsx +++ b/src/screens/SourceConfigure.tsx @@ -10,7 +10,7 @@ import { createElement, useContext, useEffect } from 'react'; import { useParams } from 'react-router-dom'; import List from '@mui/material/List'; import { useTranslation } from 'react-i18next'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import cloneObject from '@/util/cloneObject'; import NavbarContext from '@/components/context/NavbarContext'; import { SwitchPreferenceCompat, CheckBoxPreference } from '@/components/sourceConfiguration/TwoStatePreference'; diff --git a/src/screens/SourceMangas.tsx b/src/screens/SourceMangas.tsx index 8f9326273f..187a0df1c3 100644 --- a/src/screens/SourceMangas.tsx +++ b/src/screens/SourceMangas.tsx @@ -18,7 +18,7 @@ import FavoriteIcon from '@mui/icons-material/Favorite'; import NewReleasesIcon from '@mui/icons-material/NewReleases'; import FilterListIcon from '@mui/icons-material/FilterList'; import { IManga, PaginatedMangaList, TranslationKey } from '@/typings'; -import requestManager, { AbortableSWRInfiniteResponse } from '@/lib/RequestManager'; +import requestManager, { AbortableSWRInfiniteResponse } from '@/lib/requests/RequestManager.ts'; import { useDebounce } from '@/components/manga/hooks'; import { useLibraryOptionsContext } from '@/components/context/LibraryOptionsContext'; import SourceGridLayout from '@/components/source/GridLayouts'; diff --git a/src/screens/Sources.tsx b/src/screens/Sources.tsx index 52ed46e041..1143a10a76 100644 --- a/src/screens/Sources.tsx +++ b/src/screens/Sources.tsx @@ -12,7 +12,7 @@ import TravelExploreIcon from '@mui/icons-material/TravelExplore'; import { useNavigate } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { ISource } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import useLocalStorage from '@/util/useLocalStorage'; import { sourceDefualtLangs, sourceForcedDefaultLangs, langSortCmp } from '@/util/language'; import { translateExtensionLanguage } from '@/screens/util/Extensions'; diff --git a/src/screens/Updates.tsx b/src/screens/Updates.tsx index fcbb58534a..85e13d84a3 100644 --- a/src/screens/Updates.tsx +++ b/src/screens/Updates.tsx @@ -19,7 +19,7 @@ import { useTranslation } from 'react-i18next'; import { t as translate } from 'i18next'; import { GroupedVirtuoso } from 'react-virtuoso'; import { IChapter, IMangaChapter, IQueue } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import LoadingPlaceholder from '@/components/util/LoadingPlaceholder'; import EmptyView from '@/components/util/EmptyView'; import DownloadStateIndicator from '@/components/molecules/DownloadStateIndicator'; diff --git a/src/screens/settings/About.tsx b/src/screens/settings/About.tsx index db196541fb..28c74b223c 100644 --- a/src/screens/settings/About.tsx +++ b/src/screens/settings/About.tsx @@ -11,7 +11,7 @@ import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; import ListItemText from '@mui/material/ListItemText'; import { useTranslation } from 'react-i18next'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import ListItemLink from '@/components/util/ListItemLink'; import NavbarContext, { useSetDefaultBackTo } from '@/components/context/NavbarContext'; import LoadingPlaceholder from '@/components/util/LoadingPlaceholder'; diff --git a/src/screens/settings/Backup.tsx b/src/screens/settings/Backup.tsx index c475559467..d6171b0169 100644 --- a/src/screens/settings/Backup.tsx +++ b/src/screens/settings/Backup.tsx @@ -12,7 +12,7 @@ import ListItemText from '@mui/material/ListItemText'; import { fromEvent } from 'file-selector'; import { useTranslation } from 'react-i18next'; import { ListItemButton } from '@mui/material'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import makeToast from '@/components/util/Toast'; import ListItemLink from '@/components/util/ListItemLink'; import NavbarContext, { useSetDefaultBackTo } from '@/components/context/NavbarContext'; diff --git a/src/screens/settings/Categories.tsx b/src/screens/settings/Categories.tsx index 5c0dd99191..938bfec3f4 100644 --- a/src/screens/settings/Categories.tsx +++ b/src/screens/settings/Categories.tsx @@ -25,7 +25,7 @@ import Checkbox from '@mui/material/Checkbox'; import FormControlLabel from '@mui/material/FormControlLabel'; import { useTranslation } from 'react-i18next'; import { ICategory } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import StrictModeDroppable from '@/lib/StrictModeDroppable'; import { DEFAULT_FULL_FAB_HEIGHT } from '@/components/util/StyledFab'; import NavbarContext, { useSetDefaultBackTo } from '@/components/context/NavbarContext'; diff --git a/src/screens/settings/LibrarySettings.tsx b/src/screens/settings/LibrarySettings.tsx index b6740fae94..e690ced712 100644 --- a/src/screens/settings/LibrarySettings.tsx +++ b/src/screens/settings/LibrarySettings.tsx @@ -21,7 +21,7 @@ import { styled } from '@mui/material'; import { t as translate } from 'i18next'; import { useTranslation } from 'react-i18next'; import { ICategory, IncludeInGlobalUpdate } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import makeToast from '@/components/util/Toast'; import ThreeStateCheckboxInput from '@/components/atoms/ThreeStateCheckboxInput'; import NavbarContext, { useSetDefaultBackTo } from '@/components/context/NavbarContext'; diff --git a/src/util/metadata.ts b/src/util/metadata.ts index 32b0ca94ad..8811056b39 100644 --- a/src/util/metadata.ts +++ b/src/util/metadata.ts @@ -19,7 +19,7 @@ import { MetadataHolder, MetadataKeyValuePair, } from '@/typings'; -import requestManager, { RequestManager } from '@/lib/RequestManager'; +import requestManager, { RequestManager } from '@/lib/requests/RequestManager.ts'; const APP_METADATA_KEY_PREFIX = 'webUI_'; diff --git a/src/util/readerSettings.ts b/src/util/readerSettings.ts index b595181eae..a732e6f758 100644 --- a/src/util/readerSettings.ts +++ b/src/util/readerSettings.ts @@ -7,7 +7,7 @@ */ import { IManga, Metadata, MetadataHolder, IReaderSettings, MetadataKeyValuePair } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import { getMetadataFrom, requestUpdateMangaMetadata, requestUpdateServerMetadata } from '@/util/metadata'; type UndefinedReaderSettings = { diff --git a/src/util/searchSettings.ts b/src/util/searchSettings.ts index 417ebc87a6..dc082368d4 100644 --- a/src/util/searchSettings.ts +++ b/src/util/searchSettings.ts @@ -7,7 +7,7 @@ */ import { Metadata, ISearchSettings } from '@/typings'; -import requestManager from '@/lib/RequestManager'; +import requestManager from '@/lib/requests/RequestManager.ts'; import { getMetadataFrom } from '@/util/metadata'; export const getDefaultSettings = (): ISearchSettings => ({