Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/remove manually created typing d ts file #249

Merged
merged 3 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/ExtensionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Typography from '@mui/material/Typography';
import client from 'util/client';
import useLocalStorage from 'util/useLocalStorage';
import { Box } from '@mui/system';
import { IExtension } from 'typings';

interface IProps {
extension: IExtension;
Expand Down
1 change: 1 addition & 0 deletions src/components/MangaCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import SpinnerImage from 'components/util/SpinnerImage';
import { Box, styled } from '@mui/system';
import { GridLayout, useLibraryOptionsContext } from 'components/context/LibraryOptionsContext';
import { BACK } from 'util/useBackTo';
import { IMangaCard } from 'typings';

const BottomGradient = styled('div')({
position: 'absolute',
Expand Down
1 change: 1 addition & 0 deletions src/components/MangaGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { Typography } from '@mui/material';
import { Box } from '@mui/system';
import MangaCard from 'components/MangaCard';
import { GridLayout } from 'components/context/LibraryOptionsContext';
import { IMangaCard } from 'typings';

export interface IMangaGridProps {
mangas: IMangaCard[];
Expand Down
1 change: 1 addition & 0 deletions src/components/SourceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import React from 'react';
import { Link, useHistory } from 'react-router-dom';
import { langCodeToName } from 'util/language';
import useLocalStorage from 'util/useLocalStorage';
import { ISource } from 'typings';

const MobileWidthButtons = styled('div')(({ theme }) => ({
display: 'flex',
Expand Down
1 change: 1 addition & 0 deletions src/components/context/LibraryOptionsContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

import React, { useContext } from 'react';
import { LibraryOptions } from 'typings';

type ContextType = {
options: LibraryOptions;
Expand Down
1 change: 1 addition & 0 deletions src/components/context/NavbarContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

import React, { useContext, useEffect } from 'react';
import { INavbarOverride } from 'typings';

type ContextType = {
// Default back button url
Expand Down
1 change: 1 addition & 0 deletions src/components/library/LibraryMangaGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ 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';

const FILTERED_OUT_MESSAGE = 'There are no Manga matching this filter';

Expand Down
1 change: 1 addition & 0 deletions src/components/library/LibraryOptionsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ 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 } from 'typings';

const TITLES = {
filter: 'Filter',
Expand Down
1 change: 1 addition & 0 deletions src/components/library/LibraryOptionsProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import LibraryOptionsContext, { DefaultLibraryOptions } from 'components/context/LibraryOptionsContext';
import React from 'react';
import useLocalStorage from 'util/useLocalStorage';
import { LibraryOptions } from 'typings';

interface IProps {
children: React.ReactNode;
Expand Down
1 change: 1 addition & 0 deletions src/components/library/UpdateChecker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Box } from '@mui/system';
import Typography from '@mui/material/Typography';
import client from 'util/client';
import makeToast from 'components/util/Toast';
import { IUpdateStatus } from 'typings';

interface IProgressProps {
progress: number;
Expand Down
1 change: 1 addition & 0 deletions src/components/manga/ChapterCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { Link } from 'react-router-dom';
import client from 'util/client';
import { BACK } from 'util/useBackTo';
import { getUploadDateString } from 'util/date';
import { IChapter, IDownloadChapter } from 'typings';

interface IProps {
chapter: IChapter;
Expand Down
1 change: 1 addition & 0 deletions src/components/manga/ChapterList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { Virtuoso } from 'react-virtuoso';
import client, { useQuery } from 'util/client';
import ChaptersToolbarMenu from 'components/manga/ChaptersToolbarMenu';
import SelectionFAB from 'components/manga/SelectionFAB';
import { BatchChaptersChange, IChapter, IDownloadChapter, IQueue } from 'typings';

const StyledVirtuoso = styled(Virtuoso)(({ theme }) => ({
listStyle: 'none',
Expand Down
1 change: 1 addition & 0 deletions src/components/manga/ChapterOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ 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 } from 'typings';

interface IProps {
open: boolean;
Expand Down
1 change: 1 addition & 0 deletions src/components/manga/ChaptersToolbarMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ 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';

interface IProps {
options: ChapterListOptions;
Expand Down
1 change: 1 addition & 0 deletions src/components/manga/MangaDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import React from 'react';
import { mutate } from 'swr';
import client from 'util/client';
import useLocalStorage from 'util/useLocalStorage';
import { IManga, ISource } from 'typings';

const useStyles = (inLibrary: boolean) =>
makeStyles((theme: Theme) => ({
Expand Down
1 change: 1 addition & 0 deletions src/components/manga/MangaToolbarMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
} from '@mui/material';
import CategorySelect from 'components/navbar/action/CategorySelect';
import React, { useState } from 'react';
import { IManga } from 'typings';

interface IProps {
manga: IManga;
Expand Down
1 change: 1 addition & 0 deletions src/components/manga/ResumeFAB.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Fab } from '@mui/material';
import { Link } from 'react-router-dom';
import { PlayArrow } from '@mui/icons-material';
import { BACK } from 'util/useBackTo';
import { IChapter } from 'typings';

interface ResumeFABProps {
chapter: IChapter;
Expand Down
1 change: 1 addition & 0 deletions src/components/manga/util.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

import { useReducerLocalStorage } from 'util/useLocalStorage';
import { ChapterListOptions, ChapterOptionsReducerAction, ChapterSortMode, IChapter, NullAndUndefined } from 'typings';

const defaultChapterOptions: ChapterListOptions = {
active: false,
Expand Down
1 change: 1 addition & 0 deletions src/components/molecules/DownloadStateIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { CircularProgress } from '@mui/material';
import Typography from '@mui/material/Typography';
import { Box } from '@mui/system';
import React from 'react';
import { IDownloadChapter } from 'typings';

interface DownloadStateIndicatorProps {
download: IDownloadChapter;
Expand Down
1 change: 1 addition & 0 deletions src/components/navbar/DefaultNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import DesktopSideBar from 'components/navbar/navigation/DesktopSideBar';
import MobileBottomBar from 'components/navbar/navigation/MobileBottomBar';
// import { useTranslation } from 'react-i18next';
import { t } from 'i18next';
import { NavbarItem } from 'typings';

const navbarItems: Array<NavbarItem> = [
{
Expand Down
1 change: 1 addition & 0 deletions src/components/navbar/NavBarContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import React, { useState } from 'react';
import NavBarContext from 'components/context/NavbarContext';
import { INavbarOverride } from 'typings';

interface IProps {
children: React.ReactNode;
Expand Down
1 change: 1 addition & 0 deletions src/components/navbar/ReaderNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Collapse from '@mui/material/Collapse';
import { styled } from '@mui/system';
import useBackTo from 'util/useBackTo';
import ReaderSettingsOptions from 'components/reader/ReaderSettingsOptions';
import { IChapter, IManga, IMangaCard, IReaderSettings } from 'typings';

const Root = styled('div')(({ theme }) => ({
top: 0,
Expand Down
1 change: 1 addition & 0 deletions src/components/navbar/action/CategorySelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Checkbox from '@mui/material/Checkbox';
import FormControlLabel from '@mui/material/FormControlLabel';
import FormGroup from '@mui/material/FormGroup';
import client, { useQuery } from 'util/client';
import { ICategory } from 'typings';

interface IProps {
open: boolean;
Expand Down
1 change: 1 addition & 0 deletions src/components/navbar/navigation/DesktopSideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ListItem, ListItemIcon, Tooltip } from '@mui/material';
import { Link, useLocation } from 'react-router-dom';
import { styled } from '@mui/system';
import { useTheme } from '@mui/material/styles';
import { NavbarItem } from 'typings';

const SideNavBarContainer = styled('div')(({ theme }) => ({
height: '100vh',
Expand Down
1 change: 1 addition & 0 deletions src/components/navbar/navigation/MobileBottomBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ListItem } from '@mui/material';
import { styled, Box } from '@mui/system';
import { Link as RRDLink, useLocation } from 'react-router-dom';
import { useTheme } from '@mui/material/styles';
import { NavbarItem } from 'typings';

const BottomNavContainer = styled('div')(({ theme }) => ({
bottom: 0,
Expand Down
1 change: 1 addition & 0 deletions src/components/reader/DoublePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import React from 'react';
import { Box, styled } from '@mui/system';
import { IReaderSettings } from 'typings';

const Image = styled('img')({
marginBottom: 0,
Expand Down
1 change: 1 addition & 0 deletions src/components/reader/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import React, { useRef } from 'react';
import SpinnerImage from 'components/util/SpinnerImage';
import useLocalStorage from 'util/useLocalStorage';
import Box from '@mui/system/Box';
import { IReaderSettings } from 'typings';

function imageStyle(settings: IReaderSettings): any {
const [dimensions, setDimensions] = React.useState({
Expand Down
1 change: 1 addition & 0 deletions src/components/reader/PageNumber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import React from 'react';
import { Box } from '@mui/system';
import { IReaderSettings } from 'typings';

interface IProps {
settings: IReaderSettings;
Expand Down
1 change: 1 addition & 0 deletions src/components/reader/ReaderSettingsOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ 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';

interface IProps extends IReaderSettings {
setSettingValue: (key: keyof IReaderSettings, value: string | boolean) => void;
Expand Down
1 change: 1 addition & 0 deletions src/components/reader/pager/DoublePagedPager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import ReactDOM from 'react-dom';
import { Box } from '@mui/system';
import Page from 'components/reader/Page';
import DoublePage from 'components/reader/DoublePage';
import { IReaderProps } from 'typings';

const isSpreadPage = (image: HTMLImageElement): boolean => {
const aspectRatio = image.height / image.width;
Expand Down
1 change: 1 addition & 0 deletions src/components/reader/pager/HorizontalPager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import React, { useEffect, useRef } from 'react';
import { Box } from '@mui/system';
import Page from 'components/reader/Page';
import { IReaderProps } from 'typings';

const findCurrentPageIndex = (wrapper: HTMLDivElement): number => {
for (let i = 0; i < wrapper.children.length; i++) {
Expand Down
1 change: 1 addition & 0 deletions src/components/reader/pager/PagedPager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import React, { useEffect, useRef } from 'react';
import { Box } from '@mui/system';
import Page from 'components/reader/Page';
import { IReaderProps } from 'typings';

export default function PagedReader(props: IReaderProps) {
const { pages, settings, setCurPage, initialPage, curPage, nextChapter, prevChapter } = props;
Expand Down
1 change: 1 addition & 0 deletions src/components/reader/pager/VerticalPager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import React, { useCallback, useEffect, useRef } from 'react';
import { Box } from '@mui/system';
import Page from 'components/reader/Page';
import { IReaderProps } from 'typings';

const findCurrentPageIndex = (wrapper: HTMLDivElement): number => {
for (let i = 0; i < wrapper.children.length; i++) {
Expand Down
1 change: 1 addition & 0 deletions src/components/source/SourceMangaGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import React from 'react';
import MangaGrid, { IMangaGridProps } from 'components/MangaGrid';
import { IMangaCard } from 'typings';

const FILTERED_OUT_MESSAGE = 'There are no Manga matching this filter';

Expand Down
1 change: 1 addition & 0 deletions src/components/source/SourceOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import TriStateFilter from 'components/source/filters/TriStateFilter';
// 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';

interface IFilters {
sourceFilter: ISourceFilters[];
Expand Down
1 change: 1 addition & 0 deletions src/components/source/filters/GroupFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { Box } from '@mui/system';
import React from 'react';
// eslint-disable-next-line import/no-cycle
import { Options } from 'components/source/SourceOptions';
import { ISourceFilters } from 'typings';

interface Props {
state: ISourceFilters[];
Expand Down
1 change: 1 addition & 0 deletions src/components/source/filters/SortFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Collapse, ListItemButton, ListItemText, Stack } from '@mui/material';
import { Box } from '@mui/system';
import SortRadioInput from 'components/atoms/SortRadioInput';
import React from 'react';
import { IState } from 'typings';

interface Props {
values: any;
Expand Down
1 change: 1 addition & 0 deletions src/components/sourceConfiguration/EditTextPreference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ 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';

export default function EditTextPreference(props: EditTextPreferenceProps) {
const { title, summary, dialogTitle, dialogMessage, currentValue, updateValue } = props;
Expand Down
1 change: 1 addition & 0 deletions src/components/sourceConfiguration/ListPreference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ 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';

interface IListDialogProps {
value: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ 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';

interface IListDialogProps {
selectedValues: string[];
Expand Down
1 change: 1 addition & 0 deletions src/components/sourceConfiguration/TwoStatePreference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,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';

function getTwoStateType(type: 'Checkbox' | 'Switch') {
if (type === 'Switch') {
Expand Down
1 change: 1 addition & 0 deletions src/screens/DownloadQueue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { NavbarToolbar } from 'components/navbar/DefaultNavBar';
import { Link } from 'react-router-dom';
import { BACK } from 'util/useBackTo';
import { useTranslation } from 'react-i18next';
import { IChapter, IQueue } from 'typings';

const initialQueue = {
status: 'Stopped',
Expand Down
1 change: 1 addition & 0 deletions src/screens/Extensions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import AppbarSearch from 'components/util/AppbarSearch';
import { useQueryParam, StringParam } from 'use-query-params';
import { Virtuoso } from 'react-virtuoso';
import { Typography, useMediaQuery, useTheme } from '@mui/material';
import { IExtension } from 'typings';

const LANGUAGE = 0;
const EXTENSIONS = 1;
Expand Down
1 change: 1 addition & 0 deletions src/screens/Library.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { useQueryParam, NumberParam } from 'use-query-params';
import { useQuery } from 'util/client';
import UpdateChecker from 'components/library/UpdateChecker';
import { useTranslation } from 'react-i18next';
import { ICategory, IManga } from 'typings';

export default function Library() {
const { t } = useTranslation();
Expand Down
1 change: 1 addition & 0 deletions src/screens/Manga.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import LoadingPlaceholder from 'components/util/LoadingPlaceholder';
import React, { useContext, useEffect, useRef } from 'react';
import { useParams } from 'react-router-dom';
import { useQuery } from 'util/client';
import { IManga } from 'typings';

const AUTOFETCH_AGE = 60 * 60 * 24; // 24 hours

Expand Down
1 change: 1 addition & 0 deletions src/screens/Reader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
useDefaultReaderSettings,
} from 'util/readerSettings';
import makeToast from 'components/util/Toast';
import { IChapter, IManga, IMangaCard, IPartialChapter, IReaderSettings, ReaderType } from 'typings';

const getReaderComponent = (readerType: ReaderType) => {
switch (readerType) {
Expand Down
1 change: 1 addition & 0 deletions src/screens/SearchAll.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { StringParam, useQueryParam } from 'use-query-params';
import client from 'util/client';
import { langCodeToName, langSortCmp, sourceDefualtLangs, sourceForcedDefaultLangs } from 'util/language';
import useLocalStorage from 'util/useLocalStorage';
import { ISource } from 'typings';

function sourceToLangList(sources: ISource[]) {
const result: string[] = [];
Expand Down
1 change: 1 addition & 0 deletions src/screens/SourceConfigure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import EditTextPreference from 'components/sourceConfiguration/EditTextPreferenc
import MultiSelectListPreference from 'components/sourceConfiguration/MultiSelectListPreference';
import List from '@mui/material/List';
import cloneObject from 'util/cloneObject';
import { SourcePreferences } from 'typings';

function getPrefComponent(type: string) {
switch (type) {
Expand Down
1 change: 1 addition & 0 deletions src/screens/SourceMangas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import AppbarSearch from 'components/util/AppbarSearch';
import { useQueryParam, StringParam } from 'use-query-params';
import SourceGridLayout from 'components/source/GridLayouts';
import { useLibraryOptionsContext } from 'components/context/LibraryOptionsContext';
import { IManga, IMangaCard, ISource, ISourceFilters } from 'typings';

interface IPos {
position: number;
Expand Down
1 change: 1 addition & 0 deletions src/screens/Sources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { IconButton } from '@mui/material';
import TravelExploreIcon from '@mui/icons-material/TravelExplore';
import { useHistory } from 'react-router-dom';
import { useQuery } from 'util/client';
import { ISource } from 'typings';

function sourceToLangList(sources: ISource[]) {
const result: string[] = [];
Expand Down
Loading