Feature/use alias for imports (#352)
* Use alias "@" for imports * Use alias "@" for imports - Fix imports * Use alias "@" for imports - Prevent faulty "import/extensions" linting issue For some reason the rule throws an error for alias imports * Use alias "@" for imports - Update "no-relative-imports" eslint rule
This commit is contained in:
@@ -13,9 +13,9 @@ import Button from '@mui/material/Button';
|
||||
import Avatar from '@mui/material/Avatar';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import { Box } from '@mui/material';
|
||||
import { IExtension, TranslationKey } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import requestManager from 'lib/RequestManager';
|
||||
import { IExtension, TranslationKey } from '@/typings';
|
||||
import requestManager from '@/lib/RequestManager';
|
||||
|
||||
interface IProps {
|
||||
extension: IExtension;
|
||||
|
||||
@@ -12,13 +12,13 @@ import CardActionArea from '@mui/material/CardActionArea';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Avatar, Box, CardContent, Grid, styled } from '@mui/material';
|
||||
import useLocalStorage from 'util/useLocalStorage';
|
||||
import SpinnerImage from 'components/util/SpinnerImage';
|
||||
import { GridLayout, useLibraryOptionsContext } from 'components/context/LibraryOptionsContext';
|
||||
import { BACK } from 'util/useBackTo';
|
||||
import { IMangaCard } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import requestManager from 'lib/RequestManager';
|
||||
import { IMangaCard } from '@/typings';
|
||||
import requestManager from '@/lib/RequestManager';
|
||||
import { BACK } from '@/util/useBackTo';
|
||||
import useLocalStorage from '@/util/useLocalStorage';
|
||||
import { GridLayout, useLibraryOptionsContext } from '@/components/context/LibraryOptionsContext';
|
||||
import SpinnerImage from '@/components/util/SpinnerImage';
|
||||
|
||||
const BottomGradient = styled('div')({
|
||||
position: 'absolute',
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
|
||||
import React, { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
||||
import Grid from '@mui/material/Grid';
|
||||
import EmptyView from 'components/util/EmptyView';
|
||||
import LoadingPlaceholder from 'components/util/LoadingPlaceholder';
|
||||
import { Typography, Box } from '@mui/material';
|
||||
import MangaCard from 'components/MangaCard';
|
||||
import { GridLayout } from 'components/context/LibraryOptionsContext';
|
||||
import { IMangaCard } from 'typings';
|
||||
import { IMangaCard } from '@/typings';
|
||||
import EmptyView from '@/components/util/EmptyView';
|
||||
import LoadingPlaceholder from '@/components/util/LoadingPlaceholder';
|
||||
import MangaCard from '@/components/MangaCard';
|
||||
import { GridLayout } from '@/components/context/LibraryOptionsContext';
|
||||
|
||||
export interface IMangaGridProps {
|
||||
mangas: IMangaCard[];
|
||||
|
||||
@@ -15,10 +15,10 @@ import Typography from '@mui/material/Typography';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { ISource } from 'typings';
|
||||
import { translateExtensionLanguage } from 'screens/util/Extensions';
|
||||
import requestManager from 'lib/RequestManager';
|
||||
import { SourceContentType } from 'screens/SourceMangas';
|
||||
import { ISource } from '@/typings';
|
||||
import requestManager from '@/lib/RequestManager';
|
||||
import { translateExtensionLanguage } from '@/screens/util/Extensions';
|
||||
import { SourceContentType } from '@/screens/SourceMangas';
|
||||
|
||||
const MobileWidthButtons = styled('div')(({ theme }) => ({
|
||||
display: 'flex',
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import ArrowDownward from '@mui/icons-material/ArrowDownward';
|
||||
import ArrowUpward from '@mui/icons-material/ArrowUpward';
|
||||
import React from 'react';
|
||||
import RadioInput, { RadioInputProps } from 'components/atoms/RadioInput';
|
||||
import RadioInput, { RadioInputProps } from '@/components/atoms/RadioInput';
|
||||
|
||||
interface IProps extends RadioInputProps {
|
||||
sortDescending?: boolean | null | undefined;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import { FormControlLabel } from '@mui/material';
|
||||
import React from 'react';
|
||||
import ThreeStateCheckbox, { ThreeStateCheckboxProps } from 'components/atoms/ThreeStateCheckbox';
|
||||
import ThreeStateCheckbox, { ThreeStateCheckboxProps } from '@/components/atoms/ThreeStateCheckbox';
|
||||
|
||||
interface IProps extends ThreeStateCheckboxProps {
|
||||
label?: string;
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
*/
|
||||
|
||||
import { StyledEngineProvider, ThemeProvider } from '@mui/material/styles';
|
||||
import LibraryOptionsContextProvider from 'components/library/LibraryOptionsProvider';
|
||||
import NavBarContextProvider from 'components/navbar/NavBarContextProvider';
|
||||
import React, { useMemo } from 'react';
|
||||
import { BrowserRouter as Router } from 'react-router-dom';
|
||||
import { SWRConfig } from 'swr';
|
||||
import createTheme from 'theme';
|
||||
import { QueryParamProvider } from 'use-query-params';
|
||||
import useLocalStorage from 'util/useLocalStorage';
|
||||
import DarkTheme from 'components/context/DarkTheme';
|
||||
import { ReactRouter6Adapter } from 'use-query-params/adapters/react-router-6';
|
||||
import createTheme from '@/theme';
|
||||
import useLocalStorage from '@/util/useLocalStorage';
|
||||
import DarkTheme from '@/components/context/DarkTheme';
|
||||
import NavBarContextProvider from '@/components/navbar/NavBarContextProvider';
|
||||
import LibraryOptionsContextProvider from '@/components/library/LibraryOptionsProvider';
|
||||
|
||||
interface Props {
|
||||
children: React.ReactNode;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import React, { useContext } from 'react';
|
||||
import { LibraryOptions } from 'typings';
|
||||
import { LibraryOptions } from '@/typings';
|
||||
|
||||
type ContextType = {
|
||||
options: LibraryOptions;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import React, { useContext, useEffect } from 'react';
|
||||
import { INavbarOverride } from 'typings';
|
||||
import { INavbarOverride } from '@/typings';
|
||||
|
||||
type ContextType = {
|
||||
// Default back button url
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
*/
|
||||
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import MangaGrid from 'components/MangaGrid';
|
||||
import { useLibraryOptionsContext } from 'components/context/LibraryOptionsContext';
|
||||
import { StringParam, useQueryParam } from 'use-query-params';
|
||||
import { useMediaQuery, useTheme } from '@mui/material';
|
||||
import { IMangaCard, LibrarySortMode, NullAndUndefined } from 'typings';
|
||||
import { useSearchSettings } from 'util/searchSettings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { IMangaCard, LibrarySortMode, NullAndUndefined } from '@/typings';
|
||||
import { useSearchSettings } from '@/util/searchSettings';
|
||||
import { useLibraryOptionsContext } from '@/components/context/LibraryOptionsContext';
|
||||
import MangaGrid from '@/components/MangaGrid';
|
||||
|
||||
const unreadFilter = (unread: NullAndUndefined<boolean>, { unreadCount }: IMangaCard): boolean => {
|
||||
switch (unread) {
|
||||
|
||||
@@ -7,15 +7,15 @@
|
||||
*/
|
||||
|
||||
import { FormLabel, RadioGroup } from '@mui/material';
|
||||
import CheckboxInput from 'components/atoms/CheckboxInput';
|
||||
import RadioInput from 'components/atoms/RadioInput';
|
||||
import SortRadioInput from 'components/atoms/SortRadioInput';
|
||||
import ThreeStateCheckboxInput from 'components/atoms/ThreeStateCheckboxInput';
|
||||
import { GridLayout, useLibraryOptionsContext } from 'components/context/LibraryOptionsContext';
|
||||
import OptionsTabs from 'components/molecules/OptionsTabs';
|
||||
import React from 'react';
|
||||
import { LibraryOptions, LibrarySortMode, TranslationKey } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { LibraryOptions, LibrarySortMode, TranslationKey } from '@/typings';
|
||||
import CheckboxInput from '@/components/atoms/CheckboxInput';
|
||||
import RadioInput from '@/components/atoms/RadioInput';
|
||||
import SortRadioInput from '@/components/atoms/SortRadioInput';
|
||||
import ThreeStateCheckboxInput from '@/components/atoms/ThreeStateCheckboxInput';
|
||||
import { GridLayout, useLibraryOptionsContext } from '@/components/context/LibraryOptionsContext';
|
||||
import OptionsTabs from '@/components/molecules/OptionsTabs';
|
||||
|
||||
const TITLES: { [key in 'filter' | 'sort' | 'display']: TranslationKey } = {
|
||||
filter: 'global.label.filter',
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import LibraryOptionsContext, { DefaultLibraryOptions } from 'components/context/LibraryOptionsContext';
|
||||
import React, { useMemo } from 'react';
|
||||
import useLocalStorage from 'util/useLocalStorage';
|
||||
import { LibraryOptions } from 'typings';
|
||||
import { LibraryOptions } from '@/typings';
|
||||
import useLocalStorage from '@/util/useLocalStorage';
|
||||
import LibraryOptionsContext, { DefaultLibraryOptions } from '@/components/context/LibraryOptionsContext';
|
||||
|
||||
interface IProps {
|
||||
children: React.ReactNode;
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
import FilterList from '@mui/icons-material/FilterList';
|
||||
import { IconButton } from '@mui/material';
|
||||
import { useLibraryOptionsContext } from 'components/context/LibraryOptionsContext';
|
||||
import React, { useState } from 'react';
|
||||
import LibraryOptionsPanel from 'components/library/LibraryOptionsPanel';
|
||||
import { useLibraryOptionsContext } from '@/components/context/LibraryOptionsContext';
|
||||
import LibraryOptionsPanel from '@/components/library/LibraryOptionsPanel';
|
||||
|
||||
const LibraryToolbarMenu: React.FC = () => {
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
@@ -12,10 +12,10 @@ import RefreshIcon from '@mui/icons-material/Refresh';
|
||||
import CircularProgress from '@mui/material/CircularProgress';
|
||||
import { Box } from '@mui/material';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import makeToast from 'components/util/Toast';
|
||||
import { IUpdateStatus } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import requestManager from 'lib/RequestManager';
|
||||
import { IUpdateStatus } from '@/typings';
|
||||
import requestManager from '@/lib/RequestManager';
|
||||
import makeToast from '@/components/util/Toast';
|
||||
|
||||
interface IProgressProps {
|
||||
progress: number;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import { useEffect, useState } from 'react';
|
||||
import requestManager from 'lib/RequestManager';
|
||||
import requestManager from '@/lib/RequestManager';
|
||||
|
||||
const useSubscription = <T>(path: string, callback?: (newValue: T) => boolean | void) => {
|
||||
const [state, setState] = useState<T | undefined>();
|
||||
|
||||
@@ -24,14 +24,14 @@ import Menu from '@mui/material/Menu';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import DownloadStateIndicator from 'components/molecules/DownloadStateIndicator';
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { BACK } from 'util/useBackTo';
|
||||
import { getUploadDateString } from 'util/date';
|
||||
import { IChapter, IDownloadChapter } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import requestManager from 'lib/RequestManager';
|
||||
import { IChapter, IDownloadChapter } from '@/typings';
|
||||
import requestManager from '@/lib/RequestManager';
|
||||
import { getUploadDateString } from '@/util/date';
|
||||
import { BACK } from '@/util/useBackTo';
|
||||
import DownloadStateIndicator from '@/components/molecules/DownloadStateIndicator';
|
||||
|
||||
interface IProps {
|
||||
chapter: IChapter;
|
||||
|
||||
@@ -8,20 +8,20 @@
|
||||
|
||||
import { Button, CircularProgress, Stack, styled } from '@mui/material';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import useSubscription from 'components/library/useSubscription';
|
||||
import ChapterCard from 'components/manga/ChapterCard';
|
||||
import ResumeFab from 'components/manga/ResumeFAB';
|
||||
import { filterAndSortChapters, useChapterOptions } from 'components/manga/util';
|
||||
import EmptyView from 'components/util/EmptyView';
|
||||
import makeToast from 'components/util/Toast';
|
||||
import React, { ComponentProps, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { Virtuoso } from 'react-virtuoso';
|
||||
import ChaptersToolbarMenu from 'components/manga/ChaptersToolbarMenu';
|
||||
import SelectionFAB from 'components/manga/SelectionFAB';
|
||||
import { BatchChaptersChange, IChapter, IDownloadChapter, IQueue, TranslationKey } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { DEFAULT_FULL_FAB_HEIGHT } from 'components/util/StyledFab';
|
||||
import requestManager from 'lib/RequestManager';
|
||||
import { BatchChaptersChange, IChapter, IDownloadChapter, IQueue, TranslationKey } from '@/typings';
|
||||
import requestManager from '@/lib/RequestManager';
|
||||
import useSubscription from '@/components/library/useSubscription';
|
||||
import ChapterCard from '@/components/manga/ChapterCard';
|
||||
import ResumeFab from '@/components/manga/ResumeFAB';
|
||||
import { filterAndSortChapters, useChapterOptions } from '@/components/manga/util';
|
||||
import EmptyView from '@/components/util/EmptyView';
|
||||
import makeToast from '@/components/util/Toast';
|
||||
import ChaptersToolbarMenu from '@/components/manga/ChaptersToolbarMenu';
|
||||
import SelectionFAB from '@/components/manga/SelectionFAB';
|
||||
import { DEFAULT_FULL_FAB_HEIGHT } from '@/components/util/StyledFab';
|
||||
|
||||
const StyledVirtuoso = styled(Virtuoso)(({ theme }) => ({
|
||||
listStyle: 'none',
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
*/
|
||||
|
||||
import { RadioGroup } from '@mui/material';
|
||||
import RadioInput from 'components/atoms/RadioInput';
|
||||
import SortRadioInput from 'components/atoms/SortRadioInput';
|
||||
import ThreeStateCheckboxInput from 'components/atoms/ThreeStateCheckboxInput';
|
||||
import OptionsTabs from 'components/molecules/OptionsTabs';
|
||||
import React from 'react';
|
||||
import { SORT_OPTIONS } from 'components/manga/util';
|
||||
import { ChapterListOptions, ChapterOptionsReducerAction, TranslationKey } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ChapterListOptions, ChapterOptionsReducerAction, TranslationKey } from '@/typings';
|
||||
import RadioInput from '@/components/atoms/RadioInput';
|
||||
import SortRadioInput from '@/components/atoms/SortRadioInput';
|
||||
import ThreeStateCheckboxInput from '@/components/atoms/ThreeStateCheckboxInput';
|
||||
import OptionsTabs from '@/components/molecules/OptionsTabs';
|
||||
import { SORT_OPTIONS } from '@/components/manga/util';
|
||||
|
||||
interface IProps {
|
||||
open: boolean;
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
import FilterList from '@mui/icons-material/FilterList';
|
||||
import { IconButton } from '@mui/material';
|
||||
import * as React from 'react';
|
||||
import ChapterOptions from 'components/manga/ChapterOptions';
|
||||
import { isFilterActive } from 'components/manga/util';
|
||||
import { ChapterListOptions, ChapterOptionsReducerAction } from 'typings';
|
||||
import { ChapterListOptions, ChapterOptionsReducerAction } from '@/typings';
|
||||
import ChapterOptions from '@/components/manga/ChapterOptions';
|
||||
import { isFilterActive } from '@/components/manga/util';
|
||||
|
||||
interface IProps {
|
||||
options: ChapterListOptions;
|
||||
|
||||
@@ -15,10 +15,10 @@ import { styled } from '@mui/material/styles';
|
||||
import React, { useEffect } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { mutate } from 'swr';
|
||||
import { IManga, ISource } from 'typings';
|
||||
import { t as translate } from 'i18next';
|
||||
import makeToast from 'components/util/Toast';
|
||||
import requestManager from 'lib/RequestManager';
|
||||
import { IManga, ISource } from '@/typings';
|
||||
import requestManager from '@/lib/RequestManager';
|
||||
import makeToast from '@/components/util/Toast';
|
||||
|
||||
const DetailsWrapper = styled('div')(({ theme }) => ({
|
||||
width: '100%',
|
||||
|
||||
@@ -19,10 +19,10 @@ import {
|
||||
useMediaQuery,
|
||||
useTheme,
|
||||
} from '@mui/material';
|
||||
import CategorySelect from 'components/navbar/action/CategorySelect';
|
||||
import React, { useState } from 'react';
|
||||
import { IManga } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { IManga } from '@/typings';
|
||||
import CategorySelect from '@/components/navbar/action/CategorySelect';
|
||||
|
||||
interface IProps {
|
||||
manga: IManga;
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { PlayArrow } from '@mui/icons-material';
|
||||
import { BACK } from 'util/useBackTo';
|
||||
import { IChapter } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import StyledFab from 'components/util/StyledFab';
|
||||
import { IChapter } from '@/typings';
|
||||
import { BACK } from '@/util/useBackTo';
|
||||
import StyledFab from '@/components/util/StyledFab';
|
||||
|
||||
interface ResumeFABProps {
|
||||
chapter: IChapter;
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
import MoreHoriz from '@mui/icons-material/MoreHoriz';
|
||||
import { Fab, Menu, Box } from '@mui/material';
|
||||
import React, { useRef, useState } from 'react';
|
||||
import type { IChapterWithMeta } from 'components/manga/ChapterList';
|
||||
import SelectionFABActionItem from 'components/manga/SelectionFABActionItem';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { DEFAULT_FAB_STYLE } from 'components/util/StyledFab';
|
||||
import type { IChapterWithMeta } from '@/components/manga/ChapterList';
|
||||
import SelectionFABActionItem from '@/components/manga/SelectionFABActionItem';
|
||||
import { DEFAULT_FAB_STYLE } from '@/components/util/StyledFab';
|
||||
|
||||
export type SelectionAction = 'download' | 'delete' | 'bookmark' | 'unbookmark' | 'mark_as_read' | 'mark_as_unread';
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ import Download from '@mui/icons-material/Download';
|
||||
import RemoveDone from '@mui/icons-material/RemoveDone';
|
||||
import { ListItemIcon, ListItemText, MenuItem } from '@mui/material';
|
||||
import React from 'react';
|
||||
import type { IChapterWithMeta } from 'components/manga/ChapterList';
|
||||
import type { SelectionAction } from 'components/manga/SelectionFAB';
|
||||
import type { IChapterWithMeta } from '@/components/manga/ChapterList';
|
||||
import type { SelectionAction } from '@/components/manga/SelectionFAB';
|
||||
|
||||
interface IProps {
|
||||
action: SelectionAction;
|
||||
|
||||
@@ -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/RequestManager';
|
||||
|
||||
export const useRefreshManga = (mangaId: string) => {
|
||||
const [fetchingOnline, setFetchingOnline] = useState(false);
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
import { t } from 'i18next';
|
||||
import { useReducerLocalStorage } from 'util/useLocalStorage';
|
||||
import {
|
||||
ChapterListOptions,
|
||||
ChapterOptionsReducerAction,
|
||||
@@ -15,7 +14,8 @@ import {
|
||||
IChapter,
|
||||
NullAndUndefined,
|
||||
TranslationKey,
|
||||
} from 'typings';
|
||||
} from '@/typings';
|
||||
import { useReducerLocalStorage } from '@/util/useLocalStorage';
|
||||
|
||||
const defaultChapterOptions: ChapterListOptions = {
|
||||
active: false,
|
||||
|
||||
@@ -10,7 +10,7 @@ import { CircularProgress, Box } from '@mui/material';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { IDownloadChapter, TranslationKey } from 'typings';
|
||||
import { IDownloadChapter, TranslationKey } from '@/typings';
|
||||
|
||||
interface DownloadStateIndicatorProps {
|
||||
download: IDownloadChapter;
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
*/
|
||||
|
||||
import { Stack, Tab, Tabs } from '@mui/material';
|
||||
import TabPanel from 'components/util/TabPanel';
|
||||
import React, { useState } from 'react';
|
||||
import OptionsPanel from 'components/molecules/OptionsPanel';
|
||||
import TabPanel from '@/components/util/TabPanel';
|
||||
import OptionsPanel from '@/components/molecules/OptionsPanel';
|
||||
|
||||
interface IProps<T = string> {
|
||||
open: boolean;
|
||||
|
||||
@@ -25,13 +25,13 @@ import GetAppOutlinedIcon from '@mui/icons-material/GetAppOutlined';
|
||||
import SettingsIcon from '@mui/icons-material/Settings';
|
||||
import ArrowBack from '@mui/icons-material/ArrowBack';
|
||||
import { Link, useLocation, useNavigate } from 'react-router-dom';
|
||||
import NavBarContext from 'components/context/NavbarContext';
|
||||
import ExtensionOutlinedIcon from 'components/util/CustomExtensionOutlinedIcon';
|
||||
import { createPortal } from 'react-dom';
|
||||
import useBackTo from 'util/useBackTo';
|
||||
import DesktopSideBar from 'components/navbar/navigation/DesktopSideBar';
|
||||
import MobileBottomBar from 'components/navbar/navigation/MobileBottomBar';
|
||||
import { NavbarItem } from 'typings';
|
||||
import { NavbarItem } from '@/typings';
|
||||
import useBackTo from '@/util/useBackTo';
|
||||
import NavBarContext from '@/components/context/NavbarContext';
|
||||
import ExtensionOutlinedIcon from '@/components/util/CustomExtensionOutlinedIcon';
|
||||
import DesktopSideBar from '@/components/navbar/navigation/DesktopSideBar';
|
||||
import MobileBottomBar from '@/components/navbar/navigation/MobileBottomBar';
|
||||
|
||||
const navbarItems: Array<NavbarItem> = [
|
||||
{
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*/
|
||||
|
||||
import React, { useCallback, useMemo, useState } from 'react';
|
||||
import NavBarContext from 'components/context/NavbarContext';
|
||||
import { INavbarOverride } from 'typings';
|
||||
import { INavbarOverride } from '@/typings';
|
||||
import NavBarContext from '@/components/context/NavbarContext';
|
||||
|
||||
interface IProps {
|
||||
children: React.ReactNode;
|
||||
|
||||
@@ -23,10 +23,10 @@ import ListItem from '@mui/material/ListItem';
|
||||
import ListItemText from '@mui/material/ListItemText';
|
||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
||||
import Collapse from '@mui/material/Collapse';
|
||||
import useBackTo from 'util/useBackTo';
|
||||
import ReaderSettingsOptions from 'components/reader/ReaderSettingsOptions';
|
||||
import { ChapterOffset, IChapter, IManga, IMangaCard, IReaderSettings } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ChapterOffset, IChapter, IManga, IMangaCard, IReaderSettings } from '@/typings';
|
||||
import useBackTo from '@/util/useBackTo';
|
||||
import ReaderSettingsOptions from '@/components/reader/ReaderSettingsOptions';
|
||||
|
||||
const Root = styled('div')(({ theme }) => ({
|
||||
top: 0,
|
||||
|
||||
@@ -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/RequestManager';
|
||||
|
||||
interface IProps {
|
||||
open: boolean;
|
||||
|
||||
@@ -17,9 +17,9 @@ import IconButton from '@mui/material/IconButton';
|
||||
import FilterListIcon from '@mui/icons-material/FilterList';
|
||||
import { List, ListItemSecondaryAction, ListItemText } from '@mui/material';
|
||||
import ListItem from '@mui/material/ListItem';
|
||||
import cloneObject from 'util/cloneObject';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { translateExtensionLanguage } from 'screens/util/Extensions';
|
||||
import cloneObject from '@/util/cloneObject';
|
||||
import { translateExtensionLanguage } from '@/screens/util/Extensions';
|
||||
|
||||
function removeAll(firstList: any[], secondList: any[]) {
|
||||
secondList.forEach((item) => {
|
||||
|
||||
@@ -10,8 +10,8 @@ import React from 'react';
|
||||
import { ListItemIcon, Tooltip, styled, ListItemButton } from '@mui/material';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import { NavbarItem } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { NavbarItem } from '@/typings';
|
||||
|
||||
const SideNavBarContainer = styled('div')(({ theme }) => ({
|
||||
height: '100vh',
|
||||
|
||||
@@ -10,8 +10,8 @@ import React from 'react';
|
||||
import { styled, Box, ListItemButton } from '@mui/material';
|
||||
import { Link as RRDLink, useLocation } from 'react-router-dom';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import { NavbarItem } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { NavbarItem } from '@/typings';
|
||||
|
||||
const BottomNavContainer = styled('div')(({ theme }) => ({
|
||||
bottom: 0,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import { Box, styled } from '@mui/material';
|
||||
import { IReaderSettings } from 'typings';
|
||||
import { IReaderSettings } from '@/typings';
|
||||
|
||||
const Image = styled('img')({
|
||||
marginBottom: 0,
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
*/
|
||||
|
||||
import React, { useRef } from 'react';
|
||||
import SpinnerImage from 'components/util/SpinnerImage';
|
||||
import Box from '@mui/material/Box';
|
||||
import { IReaderSettings } from 'typings';
|
||||
import { IReaderSettings } from '@/typings';
|
||||
import SpinnerImage from '@/components/util/SpinnerImage';
|
||||
|
||||
function imageStyle(settings: IReaderSettings): any {
|
||||
const [dimensions, setDimensions] = React.useState({
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import { Box } from '@mui/material';
|
||||
import { IReaderSettings } from 'typings';
|
||||
import { IReaderSettings } from '@/typings';
|
||||
|
||||
interface IProps {
|
||||
settings: IReaderSettings;
|
||||
|
||||
@@ -11,8 +11,8 @@ import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
||||
import Select from '@mui/material/Select';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import React from 'react';
|
||||
import { IReaderSettings } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { IReaderSettings } from '@/typings';
|
||||
|
||||
interface IProps extends IReaderSettings {
|
||||
setSettingValue: (key: keyof IReaderSettings, value: string | boolean) => void;
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { Box } from '@mui/material';
|
||||
import Page from 'components/reader/Page';
|
||||
import DoublePage from 'components/reader/DoublePage';
|
||||
import { IReaderProps } from 'typings';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { IReaderProps } from '@/typings';
|
||||
import Page from '@/components/reader/Page';
|
||||
import DoublePage from '@/components/reader/DoublePage';
|
||||
|
||||
const isSpreadPage = (image: HTMLImageElement): boolean => {
|
||||
const aspectRatio = image.height / image.width;
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { Box } from '@mui/material';
|
||||
import Page from 'components/reader/Page';
|
||||
import { IReaderProps } from 'typings';
|
||||
import { IReaderProps } from '@/typings';
|
||||
import Page from '@/components/reader/Page';
|
||||
|
||||
const findCurrentPageIndex = (wrapper: HTMLDivElement): number => {
|
||||
for (let i = 0; i < wrapper.children.length; i++) {
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { Box } from '@mui/material';
|
||||
import Page from 'components/reader/Page';
|
||||
import { IReaderProps } from 'typings';
|
||||
import { IReaderProps } from '@/typings';
|
||||
import Page from '@/components/reader/Page';
|
||||
|
||||
export default function PagedReader(props: IReaderProps) {
|
||||
const { pages, settings, setCurPage, initialPage, curPage, nextChapter, prevChapter } = props;
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
import React, { useCallback, useEffect, useRef } from 'react';
|
||||
import { Box } from '@mui/material';
|
||||
import Page from 'components/reader/Page';
|
||||
import { IReaderProps } from 'typings';
|
||||
import { IReaderProps } from '@/typings';
|
||||
import Page from '@/components/reader/Page';
|
||||
|
||||
const findCurrentPageIndex = (wrapper: HTMLDivElement): number => {
|
||||
for (let i = 0; i < wrapper.children.length; i++) {
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
import { IconButton, Menu, MenuItem, FormControlLabel, Radio } from '@mui/material';
|
||||
import React from 'react';
|
||||
import ViewModuleIcon from '@mui/icons-material/ViewModule';
|
||||
import { GridLayout, useLibraryOptionsContext } from 'components/context/LibraryOptionsContext';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { GridLayout, useLibraryOptionsContext } from '@/components/context/LibraryOptionsContext';
|
||||
|
||||
// TODO: clean up this to use a FormControl, and remove dependency on name o radio button
|
||||
export default function SourceGridLayout() {
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import MangaGrid, { IMangaGridProps } from 'components/MangaGrid';
|
||||
import { IMangaCard } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { IMangaCard } from '@/typings';
|
||||
import MangaGrid, { IMangaGridProps } from '@/components/MangaGrid';
|
||||
|
||||
function filterManga(mangas: IMangaCard[]): IMangaCard[] {
|
||||
return mangas;
|
||||
|
||||
@@ -8,21 +8,21 @@
|
||||
|
||||
import FilterListIcon from '@mui/icons-material/FilterList';
|
||||
import { Button, Stack, Box } from '@mui/material';
|
||||
import OptionsPanel from 'components/molecules/OptionsPanel';
|
||||
import React from 'react';
|
||||
import CheckBoxFilter from 'components/source/filters/CheckBoxFilter';
|
||||
import HeaderFilter from 'components/source/filters/HeaderFilter';
|
||||
import SelectFilter from 'components/source/filters/SelectFilter';
|
||||
import SortFilter from 'components/source/filters/SortFilter';
|
||||
import TextFilter from 'components/source/filters/TextFilter';
|
||||
import TriStateFilter from 'components/source/filters/TriStateFilter';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ISourceFilters, IState } from '@/typings';
|
||||
import OptionsPanel from '@/components/molecules/OptionsPanel';
|
||||
import CheckBoxFilter from '@/components/source/filters/CheckBoxFilter';
|
||||
import HeaderFilter from '@/components/source/filters/HeaderFilter';
|
||||
import SelectFilter from '@/components/source/filters/SelectFilter';
|
||||
import SortFilter from '@/components/source/filters/SortFilter';
|
||||
import TextFilter from '@/components/source/filters/TextFilter';
|
||||
import TriStateFilter from '@/components/source/filters/TriStateFilter';
|
||||
// this can only cycle once, so should be fine
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
import GroupFilter from 'components/source/filters/GroupFilter';
|
||||
import SeperatorFilter from 'components/source/filters/SeparatorFilter';
|
||||
import { ISourceFilters, IState } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import StyledFab from 'components/util/StyledFab';
|
||||
import GroupFilter from '@/components/source/filters/GroupFilter';
|
||||
import SeperatorFilter from '@/components/source/filters/SeparatorFilter';
|
||||
import StyledFab from '@/components/util/StyledFab';
|
||||
|
||||
interface IFilters {
|
||||
sourceFilter: ISourceFilters[];
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import CheckboxInput from 'components/atoms/CheckboxInput';
|
||||
import React from 'react';
|
||||
import CheckboxInput from '@/components/atoms/CheckboxInput';
|
||||
|
||||
interface Props {
|
||||
state: boolean;
|
||||
|
||||
@@ -10,8 +10,8 @@ import { ExpandLess, ExpandMore } from '@mui/icons-material';
|
||||
import { Collapse, ListItemButton, ListItemText, Stack, Box } from '@mui/material';
|
||||
import React from 'react';
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
import { Options } from 'components/source/SourceOptions';
|
||||
import { ISourceFilters } from 'typings';
|
||||
import { ISourceFilters } from '@/typings';
|
||||
import { Options } from '@/components/source/SourceOptions';
|
||||
|
||||
interface Props {
|
||||
state: ISourceFilters[];
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
import { ExpandLess, ExpandMore } from '@mui/icons-material';
|
||||
import { Collapse, ListItemButton, ListItemText, Stack, Box } from '@mui/material';
|
||||
import SortRadioInput from 'components/atoms/SortRadioInput';
|
||||
import React from 'react';
|
||||
import { IState } from 'typings';
|
||||
import { IState } from '@/typings';
|
||||
import SortRadioInput from '@/components/atoms/SortRadioInput';
|
||||
|
||||
interface Props {
|
||||
values: any;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import SearchIcon from '@mui/icons-material/Search';
|
||||
import { FormControl, Input, InputAdornment, InputLabel } from '@mui/material';
|
||||
import React, { useEffect } from 'react';
|
||||
import { useDebounce } from 'components/manga/hooks';
|
||||
import { useDebounce } from '@/components/manga/hooks';
|
||||
|
||||
interface Props {
|
||||
state: string;
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import ThreeStateCheckboxInput from 'components/atoms/ThreeStateCheckboxInput';
|
||||
import React from 'react';
|
||||
import ThreeStateCheckboxInput from '@/components/atoms/ThreeStateCheckboxInput';
|
||||
|
||||
interface Props {
|
||||
state: number;
|
||||
|
||||
@@ -15,9 +15,9 @@ import DialogContentText from '@mui/material/DialogContentText';
|
||||
import DialogActions from '@mui/material/DialogActions';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import Button from '@mui/material/Button';
|
||||
import { EditTextPreferenceProps } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ListItemButton } from '@mui/material';
|
||||
import { EditTextPreferenceProps } from '@/typings';
|
||||
|
||||
export default function EditTextPreference(props: EditTextPreferenceProps) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -16,9 +16,9 @@ import RadioGroup from '@mui/material/RadioGroup';
|
||||
import Radio from '@mui/material/Radio';
|
||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||
import Button from '@mui/material/Button';
|
||||
import { ListPreferenceProps } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ListItemButton } from '@mui/material';
|
||||
import { ListPreferenceProps } from '@/typings';
|
||||
|
||||
interface IListDialogProps {
|
||||
value: string;
|
||||
|
||||
@@ -16,10 +16,10 @@ import FormGroup from '@mui/material/FormGroup';
|
||||
import Checkbox from '@mui/material/Checkbox';
|
||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||
import Button from '@mui/material/Button';
|
||||
import cloneObject from 'util/cloneObject';
|
||||
import { MultiSelectListPreferenceProps } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ListItemButton } from '@mui/material';
|
||||
import { MultiSelectListPreferenceProps } from '@/typings';
|
||||
import cloneObject from '@/util/cloneObject';
|
||||
|
||||
interface IListDialogProps {
|
||||
selectedValues: string[];
|
||||
|
||||
@@ -12,7 +12,7 @@ import ListItemText from '@mui/material/ListItemText';
|
||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
||||
import Switch from '@mui/material/Switch';
|
||||
import Checkbox from '@mui/material/Checkbox';
|
||||
import { CheckBoxPreferenceProps, SwitchPreferenceCompatProps, TwoStatePreferenceProps } from 'typings';
|
||||
import { CheckBoxPreferenceProps, SwitchPreferenceCompatProps, TwoStatePreferenceProps } from '@/typings';
|
||||
|
||||
function getTwoStateType(type: 'Checkbox' | 'Switch') {
|
||||
if (type === 'Switch') {
|
||||
|
||||
Reference in New Issue
Block a user