diff options
Diffstat (limited to 'frontend/src/pages')
76 files changed, 425 insertions, 412 deletions
diff --git a/frontend/src/pages/Authentication.test.tsx b/frontend/src/pages/Authentication.test.tsx index 95bfe3f47..e5dee6e44 100644 --- a/frontend/src/pages/Authentication.test.tsx +++ b/frontend/src/pages/Authentication.test.tsx @@ -1,5 +1,5 @@ -import { render, screen } from "@/tests"; import { describe, it } from "vitest"; +import { render, screen } from "@/tests"; import Authentication from "./Authentication"; describe("Authentication", () => { diff --git a/frontend/src/pages/Authentication.tsx b/frontend/src/pages/Authentication.tsx index 33fda6f01..7a164c6c4 100644 --- a/frontend/src/pages/Authentication.tsx +++ b/frontend/src/pages/Authentication.tsx @@ -1,5 +1,4 @@ -import { useSystem } from "@/apis/hooks"; -import { Environment } from "@/utilities"; +import { FunctionComponent } from "react"; import { Avatar, Button, @@ -11,7 +10,8 @@ import { TextInput, } from "@mantine/core"; import { useForm } from "@mantine/form"; -import { FunctionComponent } from "react"; +import { useSystem } from "@/apis/hooks"; +import { Environment } from "@/utilities"; const Authentication: FunctionComponent = () => { const { login } = useSystem(); diff --git a/frontend/src/pages/Blacklist/Movies/index.tsx b/frontend/src/pages/Blacklist/Movies/index.tsx index 67c6a2a7d..9e552fa7d 100644 --- a/frontend/src/pages/Blacklist/Movies/index.tsx +++ b/frontend/src/pages/Blacklist/Movies/index.tsx @@ -1,13 +1,13 @@ +import { FunctionComponent } from "react"; +import { Container, Stack } from "@mantine/core"; +import { useDocumentTitle } from "@mantine/hooks"; +import { faTrash } from "@fortawesome/free-solid-svg-icons"; import { useMovieBlacklist, useMovieDeleteBlacklist, } from "@/apis/hooks/movies"; import { Toolbox } from "@/components"; import { QueryOverlay } from "@/components/async"; -import { faTrash } from "@fortawesome/free-solid-svg-icons"; -import { Container, Stack } from "@mantine/core"; -import { useDocumentTitle } from "@mantine/hooks"; -import { FunctionComponent } from "react"; import Table from "./table"; const BlacklistMoviesView: FunctionComponent = () => { diff --git a/frontend/src/pages/Blacklist/Movies/table.tsx b/frontend/src/pages/Blacklist/Movies/table.tsx index 6609d186d..0ac3bf3a8 100644 --- a/frontend/src/pages/Blacklist/Movies/table.tsx +++ b/frontend/src/pages/Blacklist/Movies/table.tsx @@ -1,13 +1,13 @@ +import { FunctionComponent, useMemo } from "react"; +import { Link } from "react-router-dom"; +import { Column } from "react-table"; +import { Anchor, Text } from "@mantine/core"; +import { faTrash } from "@fortawesome/free-solid-svg-icons"; import { useMovieDeleteBlacklist } from "@/apis/hooks"; import { PageTable } from "@/components"; import MutateAction from "@/components/async/MutateAction"; import Language from "@/components/bazarr/Language"; import TextPopover from "@/components/TextPopover"; -import { faTrash } from "@fortawesome/free-solid-svg-icons"; -import { Anchor, Text } from "@mantine/core"; -import { FunctionComponent, useMemo } from "react"; -import { Link } from "react-router-dom"; -import { Column } from "react-table"; interface Props { blacklist: readonly Blacklist.Movie[]; diff --git a/frontend/src/pages/Blacklist/Series/index.tsx b/frontend/src/pages/Blacklist/Series/index.tsx index a4a6d3638..3bdec2b19 100644 --- a/frontend/src/pages/Blacklist/Series/index.tsx +++ b/frontend/src/pages/Blacklist/Series/index.tsx @@ -1,10 +1,10 @@ +import { FunctionComponent } from "react"; +import { Container, Stack } from "@mantine/core"; +import { useDocumentTitle } from "@mantine/hooks"; +import { faTrash } from "@fortawesome/free-solid-svg-icons"; import { useEpisodeBlacklist, useEpisodeDeleteBlacklist } from "@/apis/hooks"; import { Toolbox } from "@/components"; import { QueryOverlay } from "@/components/async"; -import { faTrash } from "@fortawesome/free-solid-svg-icons"; -import { Container, Stack } from "@mantine/core"; -import { useDocumentTitle } from "@mantine/hooks"; -import { FunctionComponent } from "react"; import Table from "./table"; const BlacklistSeriesView: FunctionComponent = () => { diff --git a/frontend/src/pages/Blacklist/Series/table.tsx b/frontend/src/pages/Blacklist/Series/table.tsx index 96ea1a8a7..655b8d67a 100644 --- a/frontend/src/pages/Blacklist/Series/table.tsx +++ b/frontend/src/pages/Blacklist/Series/table.tsx @@ -1,13 +1,13 @@ +import { FunctionComponent, useMemo } from "react"; +import { Link } from "react-router-dom"; +import { Column } from "react-table"; +import { Anchor, Text } from "@mantine/core"; +import { faTrash } from "@fortawesome/free-solid-svg-icons"; import { useEpisodeDeleteBlacklist } from "@/apis/hooks"; import { PageTable } from "@/components"; import MutateAction from "@/components/async/MutateAction"; import Language from "@/components/bazarr/Language"; import TextPopover from "@/components/TextPopover"; -import { faTrash } from "@fortawesome/free-solid-svg-icons"; -import { Anchor, Text } from "@mantine/core"; -import { FunctionComponent, useMemo } from "react"; -import { Link } from "react-router-dom"; -import { Column } from "react-table"; interface Props { blacklist: readonly Blacklist.Episode[]; diff --git a/frontend/src/pages/Episodes/components.tsx b/frontend/src/pages/Episodes/components.tsx index 698785d5e..29ce2e0fa 100644 --- a/frontend/src/pages/Episodes/components.tsx +++ b/frontend/src/pages/Episodes/components.tsx @@ -1,9 +1,9 @@ +import { FunctionComponent, useMemo, useState } from "react"; +import { Badge, MantineColor, Tooltip } from "@mantine/core"; import { useEpisodeSubtitleModification } from "@/apis/hooks"; import Language from "@/components/bazarr/Language"; import SubtitleToolsMenu from "@/components/SubtitleToolsMenu"; import { task, TaskGroup } from "@/modules/task"; -import { Badge, MantineColor, Tooltip } from "@mantine/core"; -import { FunctionComponent, useMemo, useState } from "react"; interface Props { seriesId: number; diff --git a/frontend/src/pages/Episodes/index.tsx b/frontend/src/pages/Episodes/index.tsx index b016490ff..13c112050 100644 --- a/frontend/src/pages/Episodes/index.tsx +++ b/frontend/src/pages/Episodes/index.tsx @@ -1,4 +1,26 @@ -import { RouterNames } from "@/Router/RouterNames"; +import { + FunctionComponent, + useCallback, + useMemo, + useRef, + useState, +} from "react"; +import { Navigate, useParams } from "react-router-dom"; +import { Container, Group, Stack } from "@mantine/core"; +import { Dropzone } from "@mantine/dropzone"; +import { useDocumentTitle } from "@mantine/hooks"; +import { showNotification } from "@mantine/notifications"; +import { + faAdjust, + faBriefcase, + faCircleChevronDown, + faCircleChevronRight, + faCloudUploadAlt, + faHdd, + faSearch, + faSync, + faWrench, +} from "@fortawesome/free-solid-svg-icons"; import { useEpisodesBySeriesId, useIsAnyActionRunning, @@ -12,32 +34,10 @@ import { ItemEditModal } from "@/components/forms/ItemEditForm"; import { SeriesUploadModal } from "@/components/forms/SeriesUploadForm"; import { SubtitleToolsModal } from "@/components/modals"; import { useModals } from "@/modules/modals"; -import { TaskGroup, notification, task } from "@/modules/task"; +import { notification, task, TaskGroup } from "@/modules/task"; import ItemOverview from "@/pages/views/ItemOverview"; +import { RouterNames } from "@/Router/RouterNames"; import { useLanguageProfileBy } from "@/utilities/languages"; -import { - faAdjust, - faBriefcase, - faCircleChevronDown, - faCircleChevronRight, - faCloudUploadAlt, - faHdd, - faSearch, - faSync, - faWrench, -} from "@fortawesome/free-solid-svg-icons"; -import { Container, Group, Stack } from "@mantine/core"; -import { Dropzone } from "@mantine/dropzone"; -import { useDocumentTitle } from "@mantine/hooks"; -import { showNotification } from "@mantine/notifications"; -import { - FunctionComponent, - useCallback, - useMemo, - useRef, - useState, -} from "react"; -import { Navigate, useParams } from "react-router-dom"; import Table from "./table"; const SeriesEpisodesView: FunctionComponent = () => { diff --git a/frontend/src/pages/Episodes/table.tsx b/frontend/src/pages/Episodes/table.tsx index f1aa6a52e..d7eb0a0e1 100644 --- a/frontend/src/pages/Episodes/table.tsx +++ b/frontend/src/pages/Episodes/table.tsx @@ -1,29 +1,29 @@ +import { + FunctionComponent, + useCallback, + useEffect, + useMemo, + useRef, +} from "react"; +import { Column, TableInstance } from "react-table"; +import { Group, Text } from "@mantine/core"; +import { faBookmark as farBookmark } from "@fortawesome/free-regular-svg-icons"; +import { + faBookmark, + faHistory, + faUser, +} from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useDownloadEpisodeSubtitles, useEpisodesProvider } from "@/apis/hooks"; import { useShowOnlyDesired } from "@/apis/hooks/site"; import { Action, GroupTable } from "@/components"; -import TextPopover from "@/components/TextPopover"; import { AudioList } from "@/components/bazarr"; import { EpisodeHistoryModal } from "@/components/modals"; import { EpisodeSearchModal } from "@/components/modals/ManualSearchModal"; +import TextPopover from "@/components/TextPopover"; import { useModals } from "@/modules/modals"; import { BuildKey, filterSubtitleBy } from "@/utilities"; import { useProfileItemsToLanguages } from "@/utilities/languages"; -import { faBookmark as farBookmark } from "@fortawesome/free-regular-svg-icons"; -import { - faBookmark, - faHistory, - faUser, -} from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Group, Text } from "@mantine/core"; -import { - FunctionComponent, - useCallback, - useEffect, - useMemo, - useRef, -} from "react"; -import { Column, TableInstance } from "react-table"; import { Subtitle } from "./components"; interface Props { diff --git a/frontend/src/pages/History/Movies/index.tsx b/frontend/src/pages/History/Movies/index.tsx index bdbe5966a..39365e348 100644 --- a/frontend/src/pages/History/Movies/index.tsx +++ b/frontend/src/pages/History/Movies/index.tsx @@ -1,4 +1,14 @@ /* eslint-disable camelcase */ +import { FunctionComponent, useMemo } from "react"; +import { Link } from "react-router-dom"; +import { Column } from "react-table"; +import { Anchor, Badge, Text } from "@mantine/core"; +import { + faFileExcel, + faInfoCircle, + faRecycle, +} from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useMovieAddBlacklist, useMovieHistoryPagination } from "@/apis/hooks"; import { MutateAction } from "@/components/async"; import { HistoryIcon } from "@/components/bazarr"; @@ -6,16 +16,6 @@ import Language from "@/components/bazarr/Language"; import StateIcon from "@/components/StateIcon"; import TextPopover from "@/components/TextPopover"; import HistoryView from "@/pages/views/HistoryView"; -import { - faFileExcel, - faInfoCircle, - faRecycle, -} from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Anchor, Badge, Text } from "@mantine/core"; -import { FunctionComponent, useMemo } from "react"; -import { Link } from "react-router-dom"; -import { Column } from "react-table"; const MoviesHistoryView: FunctionComponent = () => { const columns: Column<History.Movie>[] = useMemo<Column<History.Movie>[]>( diff --git a/frontend/src/pages/History/Series/index.tsx b/frontend/src/pages/History/Series/index.tsx index e2d2f9662..67f18b9d9 100644 --- a/frontend/src/pages/History/Series/index.tsx +++ b/frontend/src/pages/History/Series/index.tsx @@ -1,4 +1,14 @@ /* eslint-disable camelcase */ +import { FunctionComponent, useMemo } from "react"; +import { Link } from "react-router-dom"; +import { Column } from "react-table"; +import { Anchor, Badge, Text } from "@mantine/core"; +import { + faFileExcel, + faInfoCircle, + faRecycle, +} from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useEpisodeAddBlacklist, useEpisodeHistoryPagination, @@ -9,16 +19,6 @@ import Language from "@/components/bazarr/Language"; import StateIcon from "@/components/StateIcon"; import TextPopover from "@/components/TextPopover"; import HistoryView from "@/pages/views/HistoryView"; -import { - faFileExcel, - faInfoCircle, - faRecycle, -} from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Anchor, Badge, Text } from "@mantine/core"; -import { FunctionComponent, useMemo } from "react"; -import { Link } from "react-router-dom"; -import { Column } from "react-table"; const SeriesHistoryView: FunctionComponent = () => { const columns: Column<History.Episode>[] = useMemo<Column<History.Episode>[]>( diff --git a/frontend/src/pages/History/Statistics/HistoryStats.tsx b/frontend/src/pages/History/Statistics/HistoryStats.tsx index 9358cac30..0e2d34400 100644 --- a/frontend/src/pages/History/Statistics/HistoryStats.tsx +++ b/frontend/src/pages/History/Statistics/HistoryStats.tsx @@ -1,15 +1,7 @@ -import { - useHistoryStats, - useLanguages, - useSystemProviders, -} from "@/apis/hooks"; -import { Selector, Toolbox } from "@/components"; -import { QueryOverlay } from "@/components/async"; -import { useSelectorOptions } from "@/utilities"; +import { FunctionComponent, useMemo, useState } from "react"; import { Box, Container, SimpleGrid, useMantineTheme } from "@mantine/core"; import { useDocumentTitle } from "@mantine/hooks"; import { merge } from "lodash"; -import { FunctionComponent, useMemo, useState } from "react"; import { Bar, BarChart, @@ -20,6 +12,14 @@ import { XAxis, YAxis, } from "recharts"; +import { + useHistoryStats, + useLanguages, + useSystemProviders, +} from "@/apis/hooks"; +import { Selector, Toolbox } from "@/components"; +import { QueryOverlay } from "@/components/async"; +import { useSelectorOptions } from "@/utilities"; import { actionOptions, timeFrameOptions } from "./options"; import styles from "./HistoryStats.module.scss"; diff --git a/frontend/src/pages/History/history.test.tsx b/frontend/src/pages/History/history.test.tsx index a348a5b91..277a268fb 100644 --- a/frontend/src/pages/History/history.test.tsx +++ b/frontend/src/pages/History/history.test.tsx @@ -1,7 +1,7 @@ import { renderTest, RenderTestCase } from "@/tests/render"; +import HistoryStats from "./Statistics/HistoryStats"; import MoviesHistoryView from "./Movies"; import SeriesHistoryView from "./Series"; -import HistoryStats from "./Statistics/HistoryStats"; const cases: RenderTestCase[] = [ { diff --git a/frontend/src/pages/Movies/Details/index.tsx b/frontend/src/pages/Movies/Details/index.tsx index 4168754f1..1c971d641 100644 --- a/frontend/src/pages/Movies/Details/index.tsx +++ b/frontend/src/pages/Movies/Details/index.tsx @@ -1,4 +1,21 @@ -import { RouterNames } from "@/Router/RouterNames"; +import { FunctionComponent, useCallback, useRef } from "react"; +import { Navigate, useParams } from "react-router-dom"; +import { Container, Group, Menu, Stack } from "@mantine/core"; +import { Dropzone } from "@mantine/dropzone"; +import { useDocumentTitle } from "@mantine/hooks"; +import { showNotification } from "@mantine/notifications"; +import { + faCloudUploadAlt, + faEllipsis, + faHistory, + faSearch, + faSync, + faToolbox, + faUser, + faWrench, +} from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { isNumber } from "lodash"; import { useDownloadMovieSubtitles, useIsMovieActionRunning, @@ -16,27 +33,10 @@ import { MovieUploadModal } from "@/components/forms/MovieUploadForm"; import { MovieHistoryModal, SubtitleToolsModal } from "@/components/modals"; import { MovieSearchModal } from "@/components/modals/ManualSearchModal"; import { useModals } from "@/modules/modals"; -import { TaskGroup, notification, task } from "@/modules/task"; +import { notification, task, TaskGroup } from "@/modules/task"; import ItemOverview from "@/pages/views/ItemOverview"; +import { RouterNames } from "@/Router/RouterNames"; import { useLanguageProfileBy } from "@/utilities/languages"; -import { - faCloudUploadAlt, - faEllipsis, - faHistory, - faSearch, - faSync, - faToolbox, - faUser, - faWrench, -} from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Container, Group, Menu, Stack } from "@mantine/core"; -import { Dropzone } from "@mantine/dropzone"; -import { useDocumentTitle } from "@mantine/hooks"; -import { showNotification } from "@mantine/notifications"; -import { isNumber } from "lodash"; -import { FunctionComponent, useCallback, useRef } from "react"; -import { Navigate, useParams } from "react-router-dom"; import Table from "./table"; const MovieDetailView: FunctionComponent = () => { diff --git a/frontend/src/pages/Movies/Details/table.tsx b/frontend/src/pages/Movies/Details/table.tsx index aa7e164cc..61a5c14c9 100644 --- a/frontend/src/pages/Movies/Details/table.tsx +++ b/frontend/src/pages/Movies/Details/table.tsx @@ -1,3 +1,8 @@ +import { FunctionComponent, useMemo } from "react"; +import { Column } from "react-table"; +import { Badge, Text, TextProps } from "@mantine/core"; +import { faEllipsis, faSearch } from "@fortawesome/free-solid-svg-icons"; +import { isString } from "lodash"; import { useMovieSubtitleModification } from "@/apis/hooks"; import { useShowOnlyDesired } from "@/apis/hooks/site"; import { Action, SimpleTable } from "@/components"; @@ -6,11 +11,6 @@ import SubtitleToolsMenu from "@/components/SubtitleToolsMenu"; import { task, TaskGroup } from "@/modules/task"; import { filterSubtitleBy } from "@/utilities"; import { useProfileItemsToLanguages } from "@/utilities/languages"; -import { faEllipsis, faSearch } from "@fortawesome/free-solid-svg-icons"; -import { Badge, Text, TextProps } from "@mantine/core"; -import { isString } from "lodash"; -import { FunctionComponent, useMemo } from "react"; -import { Column } from "react-table"; const missingText = "Missing Subtitles"; diff --git a/frontend/src/pages/Movies/Editor.tsx b/frontend/src/pages/Movies/Editor.tsx index a196f9deb..0c568a5b1 100644 --- a/frontend/src/pages/Movies/Editor.tsx +++ b/frontend/src/pages/Movies/Editor.tsx @@ -1,11 +1,11 @@ +import { FunctionComponent, useMemo } from "react"; +import { Column } from "react-table"; +import { useDocumentTitle } from "@mantine/hooks"; import { useMovieModification, useMovies } from "@/apis/hooks"; import { QueryOverlay } from "@/components/async"; import { AudioList } from "@/components/bazarr"; import LanguageProfileName from "@/components/bazarr/LanguageProfile"; import MassEditor from "@/pages/views/MassEditor"; -import { useDocumentTitle } from "@mantine/hooks"; -import { FunctionComponent, useMemo } from "react"; -import { Column } from "react-table"; const MovieMassEditor: FunctionComponent = () => { const query = useMovies(); diff --git a/frontend/src/pages/Movies/index.tsx b/frontend/src/pages/Movies/index.tsx index 262d56195..94c98a007 100644 --- a/frontend/src/pages/Movies/index.tsx +++ b/frontend/src/pages/Movies/index.tsx @@ -1,3 +1,11 @@ +import { FunctionComponent, useMemo } from "react"; +import { Link } from "react-router-dom"; +import { Column } from "react-table"; +import { Anchor, Badge, Container } from "@mantine/core"; +import { useDocumentTitle } from "@mantine/hooks"; +import { faBookmark as farBookmark } from "@fortawesome/free-regular-svg-icons"; +import { faBookmark, faWrench } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useMovieModification, useMoviesPagination } from "@/apis/hooks"; import { Action } from "@/components"; import { AudioList } from "@/components/bazarr"; @@ -7,14 +15,6 @@ import { ItemEditModal } from "@/components/forms/ItemEditForm"; import { useModals } from "@/modules/modals"; import ItemView from "@/pages/views/ItemView"; import { BuildKey } from "@/utilities"; -import { faBookmark as farBookmark } from "@fortawesome/free-regular-svg-icons"; -import { faBookmark, faWrench } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Anchor, Badge, Container } from "@mantine/core"; -import { useDocumentTitle } from "@mantine/hooks"; -import { FunctionComponent, useMemo } from "react"; -import { Link } from "react-router-dom"; -import { Column } from "react-table"; const MovieView: FunctionComponent = () => { const query = useMoviesPagination(); diff --git a/frontend/src/pages/Movies/movies.test.tsx b/frontend/src/pages/Movies/movies.test.tsx index fe5691a15..c4ac8133a 100644 --- a/frontend/src/pages/Movies/movies.test.tsx +++ b/frontend/src/pages/Movies/movies.test.tsx @@ -1,7 +1,7 @@ -import { render } from "@/tests"; import { describe } from "vitest"; -import MovieView from "."; +import { render } from "@/tests"; import MovieMassEditor from "./Editor"; +import MovieView from "."; describe("Movies page", () => { it("should render", () => { diff --git a/frontend/src/pages/Series/Editor.tsx b/frontend/src/pages/Series/Editor.tsx index 4db9a4c1d..239481069 100644 --- a/frontend/src/pages/Series/Editor.tsx +++ b/frontend/src/pages/Series/Editor.tsx @@ -1,11 +1,11 @@ +import { FunctionComponent, useMemo } from "react"; +import { Column } from "react-table"; +import { useDocumentTitle } from "@mantine/hooks"; import { useSeries, useSeriesModification } from "@/apis/hooks"; import { QueryOverlay } from "@/components/async"; import { AudioList } from "@/components/bazarr"; import LanguageProfileName from "@/components/bazarr/LanguageProfile"; import MassEditor from "@/pages/views/MassEditor"; -import { useDocumentTitle } from "@mantine/hooks"; -import { FunctionComponent, useMemo } from "react"; -import { Column } from "react-table"; const SeriesMassEditor: FunctionComponent = () => { const query = useSeries(); diff --git a/frontend/src/pages/Series/index.tsx b/frontend/src/pages/Series/index.tsx index 60206d34a..e36a89be6 100644 --- a/frontend/src/pages/Series/index.tsx +++ b/frontend/src/pages/Series/index.tsx @@ -1,17 +1,17 @@ +import { FunctionComponent, useMemo } from "react"; +import { Link } from "react-router-dom"; +import { Column } from "react-table"; +import { Anchor, Container, Progress } from "@mantine/core"; +import { useDocumentTitle } from "@mantine/hooks"; +import { faBookmark as farBookmark } from "@fortawesome/free-regular-svg-icons"; +import { faBookmark, faWrench } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useSeriesModification, useSeriesPagination } from "@/apis/hooks"; import { Action } from "@/components"; import LanguageProfileName from "@/components/bazarr/LanguageProfile"; import { ItemEditModal } from "@/components/forms/ItemEditForm"; import { useModals } from "@/modules/modals"; import ItemView from "@/pages/views/ItemView"; -import { faBookmark as farBookmark } from "@fortawesome/free-regular-svg-icons"; -import { faBookmark, faWrench } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Anchor, Container, Progress } from "@mantine/core"; -import { useDocumentTitle } from "@mantine/hooks"; -import { FunctionComponent, useMemo } from "react"; -import { Link } from "react-router-dom"; -import { Column } from "react-table"; const SeriesView: FunctionComponent = () => { const mutation = useSeriesModification(); diff --git a/frontend/src/pages/Series/series.test.tsx b/frontend/src/pages/Series/series.test.tsx index 6813c6e19..b8fd9fad5 100644 --- a/frontend/src/pages/Series/series.test.tsx +++ b/frontend/src/pages/Series/series.test.tsx @@ -1,7 +1,7 @@ -import { render } from "@/tests"; import { describe } from "vitest"; -import SeriesView from "."; +import { render } from "@/tests"; import SeriesMassEditor from "./Editor"; +import SeriesView from "."; describe("Series page", () => { it("should render", () => { diff --git a/frontend/src/pages/Settings/General/index.tsx b/frontend/src/pages/Settings/General/index.tsx index bec3f946f..13f8ed409 100644 --- a/frontend/src/pages/Settings/General/index.tsx +++ b/frontend/src/pages/Settings/General/index.tsx @@ -1,12 +1,11 @@ -import { Environment, toggleState } from "@/utilities"; +import { FunctionComponent, useState } from "react"; +import { Box, Group as MantineGroup, Text as MantineText } from "@mantine/core"; +import { useClipboard } from "@mantine/hooks"; import { faCheck, faClipboard, faSync, } from "@fortawesome/free-solid-svg-icons"; -import { Box, Group as MantineGroup, Text as MantineText } from "@mantine/core"; -import { useClipboard } from "@mantine/hooks"; -import { FunctionComponent, useState } from "react"; import { Action, Check, @@ -20,7 +19,8 @@ import { Section, Selector, Text, -} from "../components"; +} from "@/pages/Settings/components"; +import { Environment, toggleState } from "@/utilities"; import { branchOptions, proxyOptions, securityOptions } from "./options"; const characters = "abcdef0123456789"; diff --git a/frontend/src/pages/Settings/Languages/components.tsx b/frontend/src/pages/Settings/Languages/components.tsx index de3e89c3e..9c3cf8e94 100644 --- a/frontend/src/pages/Settings/Languages/components.tsx +++ b/frontend/src/pages/Settings/Languages/components.tsx @@ -1,16 +1,15 @@ +import { FunctionComponent, useMemo } from "react"; +import { Input } from "@mantine/core"; import { MultiSelector, MultiSelectorProps, SelectorOption, } from "@/components"; -import { Language } from "@/components/bazarr"; +import { Selector, SelectorProps } from "@/pages/Settings/components"; +import { useFormActions } from "@/pages/Settings/utilities/FormValues"; +import { BaseInput } from "@/pages/Settings/utilities/hooks"; import { useSelectorOptions } from "@/utilities"; -import { Input } from "@mantine/core"; -import { FunctionComponent, useMemo } from "react"; import { useLatestEnabledLanguages, useLatestProfiles } from "."; -import { Selector, SelectorProps } from "../components"; -import { useFormActions } from "../utilities/FormValues"; -import { BaseInput } from "../utilities/hooks"; type LanguageSelectorProps = Omit< MultiSelectorProps<Language.Info>, diff --git a/frontend/src/pages/Settings/Languages/equals.test.ts b/frontend/src/pages/Settings/Languages/equals.test.ts index ead613946..5a74db797 100644 --- a/frontend/src/pages/Settings/Languages/equals.test.ts +++ b/frontend/src/pages/Settings/Languages/equals.test.ts @@ -1,10 +1,10 @@ +import { describe, expect, it } from "vitest"; import { decodeEqualData, encodeEqualData, LanguageEqualData, LanguageEqualImmediateData, } from "@/pages/Settings/Languages/equals"; -import { describe, expect, it } from "vitest"; describe("Equals Parser", () => { it("should parse from string correctly", () => { diff --git a/frontend/src/pages/Settings/Languages/equals.tsx b/frontend/src/pages/Settings/Languages/equals.tsx index a417059ab..968550cf2 100644 --- a/frontend/src/pages/Settings/Languages/equals.tsx +++ b/frontend/src/pages/Settings/Languages/equals.tsx @@ -1,3 +1,8 @@ +import { FunctionComponent, useCallback, useMemo } from "react"; +import { Column } from "react-table"; +import { Button, Checkbox } from "@mantine/core"; +import { faEquals, faTrash } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useLanguages } from "@/apis/hooks"; import { Action, SimpleTable } from "@/components"; import LanguageSelector from "@/components/bazarr/LanguageSelector"; @@ -5,11 +10,6 @@ import { languageEqualsKey } from "@/pages/Settings/keys"; import { useFormActions } from "@/pages/Settings/utilities/FormValues"; import { useSettingValue } from "@/pages/Settings/utilities/hooks"; import { LOG } from "@/utilities/console"; -import { faEquals, faTrash } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Button, Checkbox } from "@mantine/core"; -import { FunctionComponent, useCallback, useMemo } from "react"; -import { Column } from "react-table"; interface GenericEqualTarget<T> { content: T; diff --git a/frontend/src/pages/Settings/Languages/index.tsx b/frontend/src/pages/Settings/Languages/index.tsx index 61733c992..9fe562920 100644 --- a/frontend/src/pages/Settings/Languages/index.tsx +++ b/frontend/src/pages/Settings/Languages/index.tsx @@ -1,6 +1,5 @@ -import { useLanguageProfiles, useLanguages } from "@/apis/hooks"; -import { useEnabledLanguages } from "@/utilities/languages"; import { FunctionComponent } from "react"; +import { useLanguageProfiles, useLanguages } from "@/apis/hooks"; import { Check, CollapseBox, @@ -8,14 +7,15 @@ import { Message, Section, Selector, -} from "../components"; +} from "@/pages/Settings/components"; import { defaultUndAudioLang, defaultUndEmbeddedSubtitlesLang, enabledLanguageKey, languageProfileKey, -} from "../keys"; -import { useSettingValue } from "../utilities/hooks"; +} from "@/pages/Settings/keys"; +import { useSettingValue } from "@/pages/Settings/utilities/hooks"; +import { useEnabledLanguages } from "@/utilities/languages"; import { LanguageSelector, ProfileSelector } from "./components"; import EqualsTable from "./equals"; import Table from "./table"; diff --git a/frontend/src/pages/Settings/Languages/table.tsx b/frontend/src/pages/Settings/Languages/table.tsx index 86a227207..324acfb91 100644 --- a/frontend/src/pages/Settings/Languages/table.tsx +++ b/frontend/src/pages/Settings/Languages/table.tsx @@ -1,18 +1,18 @@ +import { FunctionComponent, useCallback, useMemo } from "react"; +import { Column } from "react-table"; +import { Badge, Button, Group } from "@mantine/core"; +import { faTrash, faWrench } from "@fortawesome/free-solid-svg-icons"; +import { cloneDeep } from "lodash"; import { Action, SimpleTable } from "@/components"; import { - ProfileEditModal, anyCutoff, + ProfileEditModal, } from "@/components/forms/ProfileEditForm"; import { useModals } from "@/modules/modals"; +import { languageProfileKey } from "@/pages/Settings/keys"; +import { useFormActions } from "@/pages/Settings/utilities/FormValues"; import { BuildKey, useArrayAction } from "@/utilities"; -import { faTrash, faWrench } from "@fortawesome/free-solid-svg-icons"; -import { Badge, Button, Group } from "@mantine/core"; -import { cloneDeep } from "lodash"; -import { FunctionComponent, useCallback, useMemo } from "react"; -import { Column } from "react-table"; import { useLatestEnabledLanguages, useLatestProfiles } from "."; -import { languageProfileKey } from "../keys"; -import { useFormActions } from "../utilities/FormValues"; const Table: FunctionComponent = () => { const profiles = useLatestProfiles(); diff --git a/frontend/src/pages/Settings/Notifications/components.tsx b/frontend/src/pages/Settings/Notifications/components.tsx index cde3f3268..7ee5f5a26 100644 --- a/frontend/src/pages/Settings/Notifications/components.tsx +++ b/frontend/src/pages/Settings/Notifications/components.tsx @@ -1,9 +1,5 @@ -import api from "@/apis/raw"; -import { Selector } from "@/components"; -import MutateButton from "@/components/async/MutateButton"; -import { useModals, withModal } from "@/modules/modals"; -import { BuildKey, useSelectorOptions } from "@/utilities"; -import FormUtils from "@/utilities/form"; +import { FunctionComponent, useCallback, useMemo } from "react"; +import { useMutation } from "react-query"; import { Button, Divider, @@ -14,11 +10,18 @@ import { } from "@mantine/core"; import { useForm } from "@mantine/form"; import { isObject } from "lodash"; -import { FunctionComponent, useCallback, useMemo } from "react"; -import { useMutation } from "react-query"; -import { Card } from "../components"; -import { notificationsKey } from "../keys"; -import { useSettingValue, useUpdateArray } from "../utilities/hooks"; +import api from "@/apis/raw"; +import { Selector } from "@/components"; +import MutateButton from "@/components/async/MutateButton"; +import { useModals, withModal } from "@/modules/modals"; +import { Card } from "@/pages/Settings/components"; +import { notificationsKey } from "@/pages/Settings/keys"; +import { + useSettingValue, + useUpdateArray, +} from "@/pages/Settings/utilities/hooks"; +import { BuildKey, useSelectorOptions } from "@/utilities"; +import FormUtils from "@/utilities/form"; const notificationHook = (notifications: Settings.NotificationInfo[]) => { return notifications.map((info) => JSON.stringify(info)); diff --git a/frontend/src/pages/Settings/Notifications/index.tsx b/frontend/src/pages/Settings/Notifications/index.tsx index f764bbd61..bb116ada4 100644 --- a/frontend/src/pages/Settings/Notifications/index.tsx +++ b/frontend/src/pages/Settings/Notifications/index.tsx @@ -1,6 +1,6 @@ -import { Anchor, Blockquote, Text } from "@mantine/core"; import { FunctionComponent } from "react"; -import { Check, Layout, Message, Section } from "../components"; +import { Anchor, Blockquote, Text } from "@mantine/core"; +import { Check, Layout, Message, Section } from "@/pages/Settings/components"; import { NotificationView } from "./components"; const SettingsNotificationsView: FunctionComponent = () => { diff --git a/frontend/src/pages/Settings/Providers/components.tsx b/frontend/src/pages/Settings/Providers/components.tsx index 803550ce5..72e2c3b1f 100644 --- a/frontend/src/pages/Settings/Providers/components.tsx +++ b/frontend/src/pages/Settings/Providers/components.tsx @@ -1,44 +1,47 @@ -import { Selector } from "@/components"; -import { useModals, withModal } from "@/modules/modals"; -import { BuildKey, useSelectorOptions } from "@/utilities"; -import { ASSERT } from "@/utilities/console"; import { + FunctionComponent, + useCallback, + useMemo, + useRef, + useState, +} from "react"; +import { + AutocompleteProps, Button, Divider, Group, - Text as MantineText, SimpleGrid, Stack, - AutocompleteProps, + Text as MantineText, } from "@mantine/core"; import { useForm } from "@mantine/form"; import { capitalize } from "lodash"; -import { - FunctionComponent, - useCallback, - useMemo, - useRef, - useState, -} from "react"; +import { Selector } from "@/components"; +import { useModals, withModal } from "@/modules/modals"; import { Card, Check, Chips, - Selector as GlobalSelector, Message, Password, ProviderTestButton, + Selector as GlobalSelector, Text, -} from "../components"; +} from "@/pages/Settings/components"; import { FormContext, FormValues, runHooks, useFormActions, useStagedValues, -} from "../utilities/FormValues"; -import { SettingsProvider, useSettings } from "../utilities/SettingsProvider"; -import { useSettingValue } from "../utilities/hooks"; +} from "@/pages/Settings/utilities/FormValues"; +import { useSettingValue } from "@/pages/Settings/utilities/hooks"; +import { + SettingsProvider, + useSettings, +} from "@/pages/Settings/utilities/SettingsProvider"; +import { BuildKey, useSelectorOptions } from "@/utilities"; +import { ASSERT } from "@/utilities/console"; import { ProviderInfo } from "./list"; type SettingsKey = diff --git a/frontend/src/pages/Settings/Providers/index.tsx b/frontend/src/pages/Settings/Providers/index.tsx index ce855c4ee..a179ecda3 100644 --- a/frontend/src/pages/Settings/Providers/index.tsx +++ b/frontend/src/pages/Settings/Providers/index.tsx @@ -1,6 +1,5 @@ -import { antiCaptchaOption } from "@/pages/Settings/Providers/options"; -import { Anchor } from "@mantine/core"; import { FunctionComponent } from "react"; +import { Anchor } from "@mantine/core"; import { CollapseBox, Layout, @@ -9,7 +8,8 @@ import { Section, Selector, Text, -} from "../components"; +} from "@/pages/Settings/components"; +import { antiCaptchaOption } from "@/pages/Settings/Providers/options"; import { ProviderView } from "./components"; import { IntegrationList, ProviderList } from "./list"; diff --git a/frontend/src/pages/Settings/Providers/list.ts b/frontend/src/pages/Settings/Providers/list.ts index bb3f4e5a5..454831bae 100644 --- a/frontend/src/pages/Settings/Providers/list.ts +++ b/frontend/src/pages/Settings/Providers/list.ts @@ -1,5 +1,5 @@ -import { SelectorOption } from "@/components"; import { ReactText } from "react"; +import { SelectorOption } from "@/components"; type Input<T, N> = { type: N; diff --git a/frontend/src/pages/Settings/Radarr/index.tsx b/frontend/src/pages/Settings/Radarr/index.tsx index 8805aeed8..b2e858178 100644 --- a/frontend/src/pages/Settings/Radarr/index.tsx +++ b/frontend/src/pages/Settings/Radarr/index.tsx @@ -1,5 +1,5 @@ -import { Code } from "@mantine/core"; import { FunctionComponent } from "react"; +import { Code } from "@mantine/core"; import { Check, Chips, @@ -13,8 +13,8 @@ import { Slider, Text, URLTestButton, -} from "../components"; -import { moviesEnabledKey } from "../keys"; +} from "@/pages/Settings/components"; +import { moviesEnabledKey } from "@/pages/Settings/keys"; import { timeoutOptions } from "./options"; const SettingsRadarrView: FunctionComponent = () => { diff --git a/frontend/src/pages/Settings/Scheduler/index.tsx b/frontend/src/pages/Settings/Scheduler/index.tsx index a6cd2ca74..df88725b2 100644 --- a/frontend/src/pages/Settings/Scheduler/index.tsx +++ b/frontend/src/pages/Settings/Scheduler/index.tsx @@ -1,5 +1,5 @@ -import { SelectorOption } from "@/components"; import { FunctionComponent, useMemo } from "react"; +import { SelectorOption } from "@/components"; import { Check, CollapseBox, @@ -7,7 +7,7 @@ import { Message, Section, Selector, -} from "../components"; +} from "@/pages/Settings/components"; import { backupOptions, dayOptions, diff --git a/frontend/src/pages/Settings/Sonarr/index.tsx b/frontend/src/pages/Settings/Sonarr/index.tsx index 0f60d70a8..ed66ef679 100644 --- a/frontend/src/pages/Settings/Sonarr/index.tsx +++ b/frontend/src/pages/Settings/Sonarr/index.tsx @@ -1,5 +1,5 @@ -import { Code } from "@mantine/core"; import { FunctionComponent } from "react"; +import { Code } from "@mantine/core"; import { Check, Chips, @@ -14,9 +14,9 @@ import { Slider, Text, URLTestButton, -} from "../components"; -import { seriesEnabledKey } from "../keys"; -import { seriesTypeOptions } from "../options"; +} from "@/pages/Settings/components"; +import { seriesEnabledKey } from "@/pages/Settings/keys"; +import { seriesTypeOptions } from "@/pages/Settings/options"; import { timeoutOptions } from "./options"; const SettingsSonarrView: FunctionComponent = () => { diff --git a/frontend/src/pages/Settings/Subtitles/index.tsx b/frontend/src/pages/Settings/Subtitles/index.tsx index c4dffd227..a2250e5a9 100644 --- a/frontend/src/pages/Settings/Subtitles/index.tsx +++ b/frontend/src/pages/Settings/Subtitles/index.tsx @@ -1,5 +1,5 @@ -import { Code, Space, Table } from "@mantine/core"; import { FunctionComponent } from "react"; +import { Code, Space, Table } from "@mantine/core"; import { Check, CollapseBox, @@ -10,11 +10,11 @@ import { Selector, Slider, Text, -} from "../components"; +} from "@/pages/Settings/components"; import { SubzeroColorModification, SubzeroModification, -} from "../utilities/modifications"; +} from "@/pages/Settings/utilities/modifications"; import { adaptiveSearchingDelayOption, adaptiveSearchingDeltaOption, diff --git a/frontend/src/pages/Settings/Subtitles/options.ts b/frontend/src/pages/Settings/Subtitles/options.ts index 75fc4b027..b14d88f44 100644 --- a/frontend/src/pages/Settings/Subtitles/options.ts +++ b/frontend/src/pages/Settings/Subtitles/options.ts @@ -1,5 +1,5 @@ import { SelectorOption } from "@/components"; -import { ProviderList } from "../Providers/list"; +import { ProviderList } from "@/pages/Settings/Providers/list"; export const hiExtensionOptions: SelectorOption<string>[] = [ { diff --git a/frontend/src/pages/Settings/UI/index.tsx b/frontend/src/pages/Settings/UI/index.tsx index c7b6ada1b..a4410f0ba 100644 --- a/frontend/src/pages/Settings/UI/index.tsx +++ b/frontend/src/pages/Settings/UI/index.tsx @@ -1,6 +1,6 @@ -import { uiPageSizeKey } from "@/utilities/storage"; import { FunctionComponent } from "react"; -import { Layout, Section, Selector } from "../components"; +import { Layout, Section, Selector } from "@/pages/Settings/components"; +import { uiPageSizeKey } from "@/utilities/storage"; import { colorSchemeOptions, pageSizeOptions } from "./options"; const SettingsUIView: FunctionComponent = () => { diff --git a/frontend/src/pages/Settings/components/Card.tsx b/frontend/src/pages/Settings/components/Card.tsx index 6e4b58f47..69df15636 100644 --- a/frontend/src/pages/Settings/components/Card.tsx +++ b/frontend/src/pages/Settings/components/Card.tsx @@ -1,7 +1,7 @@ +import { FunctionComponent } from "react"; +import { Center, Stack, Text, UnstyledButton } from "@mantine/core"; import { faPlus } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Center, Stack, Text, UnstyledButton } from "@mantine/core"; -import { FunctionComponent } from "react"; import styles from "./Card.module.scss"; interface CardProps { diff --git a/frontend/src/pages/Settings/components/Layout.test.tsx b/frontend/src/pages/Settings/components/Layout.test.tsx index 512d0310c..a890bc277 100644 --- a/frontend/src/pages/Settings/components/Layout.test.tsx +++ b/frontend/src/pages/Settings/components/Layout.test.tsx @@ -1,6 +1,6 @@ -import { render, screen } from "@/tests"; import { Text } from "@mantine/core"; import { describe, it } from "vitest"; +import { render, screen } from "@/tests"; import Layout from "./Layout"; describe("Settings layout", () => { diff --git a/frontend/src/pages/Settings/components/Layout.tsx b/frontend/src/pages/Settings/components/Layout.tsx index 5fb6dbbed..c2f8c3c35 100644 --- a/frontend/src/pages/Settings/components/Layout.tsx +++ b/frontend/src/pages/Settings/components/Layout.tsx @@ -1,16 +1,20 @@ +import { FunctionComponent, ReactNode, useCallback, useMemo } from "react"; +import { Badge, Container, Group, LoadingOverlay } from "@mantine/core"; +import { useForm } from "@mantine/form"; +import { useDocumentTitle } from "@mantine/hooks"; +import { faSave } from "@fortawesome/free-solid-svg-icons"; import { useSettingsMutation, useSystemSettings } from "@/apis/hooks"; import { Toolbox } from "@/components"; import { LoadingProvider } from "@/contexts"; +import { + FormContext, + FormValues, + runHooks, +} from "@/pages/Settings/utilities/FormValues"; +import { SettingsProvider } from "@/pages/Settings/utilities/SettingsProvider"; import { useOnValueChange } from "@/utilities"; import { LOG } from "@/utilities/console"; import { usePrompt } from "@/utilities/routers"; -import { faSave } from "@fortawesome/free-solid-svg-icons"; -import { Badge, Container, Group, LoadingOverlay } from "@mantine/core"; -import { useForm } from "@mantine/form"; -import { useDocumentTitle } from "@mantine/hooks"; -import { FunctionComponent, ReactNode, useCallback, useMemo } from "react"; -import { FormContext, FormValues, runHooks } from "../utilities/FormValues"; -import { SettingsProvider } from "../utilities/SettingsProvider"; interface Props { name: string; diff --git a/frontend/src/pages/Settings/components/LayoutModal.tsx b/frontend/src/pages/Settings/components/LayoutModal.tsx index 6150295e4..532f6b6ba 100644 --- a/frontend/src/pages/Settings/components/LayoutModal.tsx +++ b/frontend/src/pages/Settings/components/LayoutModal.tsx @@ -1,7 +1,4 @@ -import { useSettingsMutation, useSystemSettings } from "@/apis/hooks"; -import { LoadingProvider } from "@/contexts"; -import { useOnValueChange } from "@/utilities"; -import { LOG } from "@/utilities/console"; +import { FunctionComponent, ReactNode, useCallback, useMemo } from "react"; import { Button, Container, @@ -11,9 +8,16 @@ import { Space, } from "@mantine/core"; import { useForm } from "@mantine/form"; -import { FunctionComponent, ReactNode, useCallback, useMemo } from "react"; -import { FormContext, FormValues, runHooks } from "../utilities/FormValues"; -import { SettingsProvider } from "../utilities/SettingsProvider"; +import { useSettingsMutation, useSystemSettings } from "@/apis/hooks"; +import { LoadingProvider } from "@/contexts"; +import { + FormContext, + FormValues, + runHooks, +} from "@/pages/Settings/utilities/FormValues"; +import { SettingsProvider } from "@/pages/Settings/utilities/SettingsProvider"; +import { useOnValueChange } from "@/utilities"; +import { LOG } from "@/utilities/console"; interface Props { children: ReactNode; diff --git a/frontend/src/pages/Settings/components/Message.tsx b/frontend/src/pages/Settings/components/Message.tsx index eac84131b..67f519485 100644 --- a/frontend/src/pages/Settings/components/Message.tsx +++ b/frontend/src/pages/Settings/components/Message.tsx @@ -1,5 +1,5 @@ -import { Text } from "@mantine/core"; import { FunctionComponent, PropsWithChildren } from "react"; +import { Text } from "@mantine/core"; interface MessageProps { type?: "warning" | "info"; diff --git a/frontend/src/pages/Settings/components/Section.test.tsx b/frontend/src/pages/Settings/components/Section.test.tsx index 850a47671..535bd8be2 100644 --- a/frontend/src/pages/Settings/components/Section.test.tsx +++ b/frontend/src/pages/Settings/components/Section.test.tsx @@ -1,6 +1,6 @@ -import { render, screen } from "@/tests"; import { Text } from "@mantine/core"; import { describe, it } from "vitest"; +import { render, screen } from "@/tests"; import { Section } from "./Section"; describe("Settings section", () => { diff --git a/frontend/src/pages/Settings/components/Section.tsx b/frontend/src/pages/Settings/components/Section.tsx index 7c5727bf0..1e6a2e0b8 100644 --- a/frontend/src/pages/Settings/components/Section.tsx +++ b/frontend/src/pages/Settings/components/Section.tsx @@ -1,5 +1,5 @@ -import { Divider, Stack, Title } from "@mantine/core"; import { FunctionComponent, PropsWithChildren } from "react"; +import { Divider, Stack, Title } from "@mantine/core"; interface SectionProps { header: string; diff --git a/frontend/src/pages/Settings/components/collapse.tsx b/frontend/src/pages/Settings/components/collapse.tsx index c598105bd..d502ecc69 100644 --- a/frontend/src/pages/Settings/components/collapse.tsx +++ b/frontend/src/pages/Settings/components/collapse.tsx @@ -1,6 +1,6 @@ -import { Collapse, Stack } from "@mantine/core"; import { FunctionComponent, PropsWithChildren, useMemo, useRef } from "react"; -import { useSettingValue } from "../utilities/hooks"; +import { Collapse, Stack } from "@mantine/core"; +import { useSettingValue } from "@/pages/Settings/utilities/hooks"; interface ContentProps { settingKey: string; diff --git a/frontend/src/pages/Settings/components/forms.test.tsx b/frontend/src/pages/Settings/components/forms.test.tsx index 26974bad9..a88d2bec7 100644 --- a/frontend/src/pages/Settings/components/forms.test.tsx +++ b/frontend/src/pages/Settings/components/forms.test.tsx @@ -1,8 +1,8 @@ -import { render, RenderOptions, screen } from "@/tests"; -import { useForm } from "@mantine/form"; import { FunctionComponent, PropsWithChildren, ReactElement } from "react"; +import { useForm } from "@mantine/form"; import { describe, it } from "vitest"; -import { FormContext, FormValues } from "../utilities/FormValues"; +import { FormContext, FormValues } from "@/pages/Settings/utilities/FormValues"; +import { render, RenderOptions, screen } from "@/tests"; import { Number, Text } from "./forms"; const FormSupport: FunctionComponent<PropsWithChildren> = ({ children }) => { diff --git a/frontend/src/pages/Settings/components/forms.tsx b/frontend/src/pages/Settings/components/forms.tsx index 1d65b0375..95134db92 100644 --- a/frontend/src/pages/Settings/components/forms.tsx +++ b/frontend/src/pages/Settings/components/forms.tsx @@ -1,7 +1,20 @@ +import { FunctionComponent, ReactNode, ReactText } from "react"; +import { + Input, + NumberInput, + NumberInputProps, + PasswordInput, + PasswordInputProps, + Slider as MantineSlider, + SliderProps as MantineSliderProps, + Switch, + TextInput, + TextInputProps, +} from "@mantine/core"; import { + Action as GlobalAction, FileBrowser, FileBrowserProps, - Action as GlobalAction, MultiSelector as GlobalMultiSelector, MultiSelectorProps as GlobalMultiSelectorProps, Selector as GlobalSelector, @@ -9,21 +22,8 @@ import { } from "@/components"; import { ActionProps as GlobalActionProps } from "@/components/inputs/Action"; import ChipInput, { ChipInputProps } from "@/components/inputs/ChipInput"; +import { BaseInput, useBaseInput } from "@/pages/Settings/utilities/hooks"; import { useSliderMarks } from "@/utilities"; -import { - Input, - Slider as MantineSlider, - SliderProps as MantineSliderProps, - NumberInput, - NumberInputProps, - PasswordInput, - PasswordInputProps, - Switch, - TextInput, - TextInputProps, -} from "@mantine/core"; -import { FunctionComponent, ReactNode, ReactText } from "react"; -import { BaseInput, useBaseInput } from "../utilities/hooks"; export type NumberProps = BaseInput<number> & NumberInputProps; diff --git a/frontend/src/pages/Settings/components/index.tsx b/frontend/src/pages/Settings/components/index.tsx index 6ac9cb86c..5e7882bbc 100644 --- a/frontend/src/pages/Settings/components/index.tsx +++ b/frontend/src/pages/Settings/components/index.tsx @@ -1,7 +1,7 @@ -import api from "@/apis/raw"; -import { Button } from "@mantine/core"; import { FunctionComponent, useCallback, useEffect, useState } from "react"; -import { useSettingValue } from "../utilities/hooks"; +import { Button } from "@mantine/core"; +import api from "@/apis/raw"; +import { useSettingValue } from "@/pages/Settings/utilities/hooks"; export const URLTestButton: FunctionComponent<{ category: "sonarr" | "radarr"; diff --git a/frontend/src/pages/Settings/components/pathMapper.tsx b/frontend/src/pages/Settings/components/pathMapper.tsx index 38fbb27e9..cc525402a 100644 --- a/frontend/src/pages/Settings/components/pathMapper.tsx +++ b/frontend/src/pages/Settings/components/pathMapper.tsx @@ -1,19 +1,19 @@ -import { Action, FileBrowser, SimpleTable } from "@/components"; -import { useArrayAction } from "@/utilities"; +import { FunctionComponent, useCallback, useMemo } from "react"; +import { Column } from "react-table"; +import { Button } from "@mantine/core"; import { faArrowCircleRight, faTrash } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Button } from "@mantine/core"; import { capitalize } from "lodash"; -import { FunctionComponent, useCallback, useMemo } from "react"; -import { Column } from "react-table"; +import { Action, FileBrowser, SimpleTable } from "@/components"; import { moviesEnabledKey, pathMappingsKey, pathMappingsMovieKey, seriesEnabledKey, -} from "../keys"; -import { useFormActions } from "../utilities/FormValues"; -import { useSettingValue } from "../utilities/hooks"; +} from "@/pages/Settings/keys"; +import { useFormActions } from "@/pages/Settings/utilities/FormValues"; +import { useSettingValue } from "@/pages/Settings/utilities/hooks"; +import { useArrayAction } from "@/utilities"; import { Message } from "./Message"; type SupportType = "sonarr" | "radarr"; diff --git a/frontend/src/pages/Settings/utilities/FormValues.ts b/frontend/src/pages/Settings/utilities/FormValues.ts index d5d1774f5..32e6af226 100644 --- a/frontend/src/pages/Settings/utilities/FormValues.ts +++ b/frontend/src/pages/Settings/utilities/FormValues.ts @@ -1,6 +1,6 @@ -import { LOG } from "@/utilities/console"; -import type { UseFormReturnType } from "@mantine/form"; import { createContext, useCallback, useContext, useRef } from "react"; +import type { UseFormReturnType } from "@mantine/form"; +import { LOG } from "@/utilities/console"; export const FormContext = createContext<UseFormReturnType<FormValues> | null>( null, diff --git a/frontend/src/pages/Settings/utilities/hooks.ts b/frontend/src/pages/Settings/utilities/hooks.ts index da874314e..00c8b9bef 100644 --- a/frontend/src/pages/Settings/utilities/hooks.ts +++ b/frontend/src/pages/Settings/utilities/hooks.ts @@ -1,12 +1,12 @@ -import { LOG } from "@/utilities/console"; -import { get, isNull, isUndefined, uniqBy } from "lodash"; import { useCallback, useMemo, useRef } from "react"; +import { get, isNull, isUndefined, uniqBy } from "lodash"; import { HookType, useFormActions, useStagedValues, -} from "../utilities/FormValues"; -import { useSettings } from "../utilities/SettingsProvider"; +} from "@/pages/Settings/utilities/FormValues"; +import { useSettings } from "@/pages/Settings/utilities/SettingsProvider"; +import { LOG } from "@/utilities/console"; export interface BaseInput<T> { disabled?: boolean; diff --git a/frontend/src/pages/System/Announcements/index.tsx b/frontend/src/pages/System/Announcements/index.tsx index 4e204431e..de9cdea3b 100644 --- a/frontend/src/pages/System/Announcements/index.tsx +++ b/frontend/src/pages/System/Announcements/index.tsx @@ -1,8 +1,8 @@ -import { useSystemAnnouncements } from "@/apis/hooks"; -import { QueryOverlay } from "@/components/async"; +import { FunctionComponent } from "react"; import { Container } from "@mantine/core"; import { useDocumentTitle } from "@mantine/hooks"; -import { FunctionComponent } from "react"; +import { useSystemAnnouncements } from "@/apis/hooks"; +import { QueryOverlay } from "@/components/async"; import Table from "./table"; const SystemAnnouncementsView: FunctionComponent = () => { diff --git a/frontend/src/pages/System/Announcements/table.tsx b/frontend/src/pages/System/Announcements/table.tsx index eb9b6e43c..7c2ddf127 100644 --- a/frontend/src/pages/System/Announcements/table.tsx +++ b/frontend/src/pages/System/Announcements/table.tsx @@ -1,10 +1,10 @@ +import { FunctionComponent, useMemo } from "react"; +import { Column } from "react-table"; +import { Anchor, Text } from "@mantine/core"; +import { faWindowClose } from "@fortawesome/free-solid-svg-icons"; import { useSystemAnnouncementsAddDismiss } from "@/apis/hooks"; import { SimpleTable } from "@/components"; import { MutateAction } from "@/components/async"; -import { faWindowClose } from "@fortawesome/free-solid-svg-icons"; -import { Anchor, Text } from "@mantine/core"; -import { FunctionComponent, useMemo } from "react"; -import { Column } from "react-table"; interface Props { announcements: readonly System.Announcements[]; diff --git a/frontend/src/pages/System/Backups/index.tsx b/frontend/src/pages/System/Backups/index.tsx index 0a19f2a9a..e4e43b425 100644 --- a/frontend/src/pages/System/Backups/index.tsx +++ b/frontend/src/pages/System/Backups/index.tsx @@ -1,10 +1,10 @@ +import { FunctionComponent } from "react"; +import { Container } from "@mantine/core"; +import { useDocumentTitle } from "@mantine/hooks"; +import { faFileArchive } from "@fortawesome/free-solid-svg-icons"; import { useCreateBackups, useSystemBackups } from "@/apis/hooks"; import { Toolbox } from "@/components"; import { QueryOverlay } from "@/components/async"; -import { faFileArchive } from "@fortawesome/free-solid-svg-icons"; -import { Container } from "@mantine/core"; -import { useDocumentTitle } from "@mantine/hooks"; -import { FunctionComponent } from "react"; import Table from "./table"; const SystemBackupsView: FunctionComponent = () => { diff --git a/frontend/src/pages/System/Backups/table.tsx b/frontend/src/pages/System/Backups/table.tsx index 42236cee5..7076e44b6 100644 --- a/frontend/src/pages/System/Backups/table.tsx +++ b/frontend/src/pages/System/Backups/table.tsx @@ -1,11 +1,11 @@ +import { FunctionComponent, useMemo } from "react"; +import { Column } from "react-table"; +import { Anchor, Text } from "@mantine/core"; +import { faHistory, faTrash } from "@fortawesome/free-solid-svg-icons"; import { useDeleteBackups, useRestoreBackups } from "@/apis/hooks"; import { Action, PageTable } from "@/components"; import { useModals } from "@/modules/modals"; import { Environment } from "@/utilities"; -import { faHistory, faTrash } from "@fortawesome/free-solid-svg-icons"; -import { Anchor, Text } from "@mantine/core"; -import { FunctionComponent, useMemo } from "react"; -import { Column } from "react-table"; interface Props { backups: readonly System.Backups[]; diff --git a/frontend/src/pages/System/Logs/index.tsx b/frontend/src/pages/System/Logs/index.tsx index a232b8069..b70389459 100644 --- a/frontend/src/pages/System/Logs/index.tsx +++ b/frontend/src/pages/System/Logs/index.tsx @@ -1,18 +1,18 @@ -import { useDeleteLogs, useSystemLogs, useSystemSettings } from "@/apis/hooks"; -import { Toolbox } from "@/components"; -import { QueryOverlay } from "@/components/async"; -import { Check, LayoutModal, Message, Text } from "@/pages/Settings/components"; -import { Environment } from "@/utilities"; +import { FunctionComponent, useCallback } from "react"; +import { Badge, Container, Group, Stack } from "@mantine/core"; +import { useDocumentTitle } from "@mantine/hooks"; +import { useModals } from "@mantine/modals"; import { faDownload, faFilter, faSync, faTrash, } from "@fortawesome/free-solid-svg-icons"; -import { Badge, Container, Group, Stack } from "@mantine/core"; -import { useDocumentTitle } from "@mantine/hooks"; -import { useModals } from "@mantine/modals"; -import { FunctionComponent, useCallback } from "react"; +import { useDeleteLogs, useSystemLogs, useSystemSettings } from "@/apis/hooks"; +import { Toolbox } from "@/components"; +import { QueryOverlay } from "@/components/async"; +import { Check, LayoutModal, Message, Text } from "@/pages/Settings/components"; +import { Environment } from "@/utilities"; import Table from "./table"; const SystemLogsView: FunctionComponent = () => { diff --git a/frontend/src/pages/System/Logs/modal.tsx b/frontend/src/pages/System/Logs/modal.tsx index 297909757..efd687ac0 100644 --- a/frontend/src/pages/System/Logs/modal.tsx +++ b/frontend/src/pages/System/Logs/modal.tsx @@ -1,6 +1,6 @@ -import { withModal } from "@/modules/modals"; -import { Code, Text } from "@mantine/core"; import { FunctionComponent, useMemo } from "react"; +import { Code, Text } from "@mantine/core"; +import { withModal } from "@/modules/modals"; interface Props { stack: string; diff --git a/frontend/src/pages/System/Logs/table.tsx b/frontend/src/pages/System/Logs/table.tsx index 5a36f0f2b..541a8e285 100644 --- a/frontend/src/pages/System/Logs/table.tsx +++ b/frontend/src/pages/System/Logs/table.tsx @@ -1,5 +1,5 @@ -import { Action, PageTable } from "@/components"; -import { useModals } from "@/modules/modals"; +import { FunctionComponent, useMemo } from "react"; +import { Column } from "react-table"; import { IconDefinition } from "@fortawesome/fontawesome-svg-core"; import { faBug, @@ -10,8 +10,8 @@ import { faQuestion, } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { FunctionComponent, useMemo } from "react"; -import { Column } from "react-table"; +import { Action, PageTable } from "@/components"; +import { useModals } from "@/modules/modals"; import SystemLogModal from "./modal"; interface Props { diff --git a/frontend/src/pages/System/Providers/index.tsx b/frontend/src/pages/System/Providers/index.tsx index cd7086221..cd4a52cfd 100644 --- a/frontend/src/pages/System/Providers/index.tsx +++ b/frontend/src/pages/System/Providers/index.tsx @@ -1,10 +1,10 @@ +import { FunctionComponent } from "react"; +import { Container, Group } from "@mantine/core"; +import { useDocumentTitle } from "@mantine/hooks"; +import { faSync, faTrash } from "@fortawesome/free-solid-svg-icons"; import { useResetProvider, useSystemProviders } from "@/apis/hooks"; import { Toolbox } from "@/components"; import { QueryOverlay } from "@/components/async"; -import { faSync, faTrash } from "@fortawesome/free-solid-svg-icons"; -import { Container, Group } from "@mantine/core"; -import { useDocumentTitle } from "@mantine/hooks"; -import { FunctionComponent } from "react"; import Table from "./table"; const SystemProvidersView: FunctionComponent = () => { diff --git a/frontend/src/pages/System/Providers/table.tsx b/frontend/src/pages/System/Providers/table.tsx index 961da65fb..0f9856d99 100644 --- a/frontend/src/pages/System/Providers/table.tsx +++ b/frontend/src/pages/System/Providers/table.tsx @@ -1,6 +1,6 @@ -import { SimpleTable } from "@/components"; import { FunctionComponent, useMemo } from "react"; import { Column } from "react-table"; +import { SimpleTable } from "@/components"; interface Props { providers: readonly System.Provider[]; diff --git a/frontend/src/pages/System/Releases/index.tsx b/frontend/src/pages/System/Releases/index.tsx index 66b5a1c8a..291607a6a 100644 --- a/frontend/src/pages/System/Releases/index.tsx +++ b/frontend/src/pages/System/Releases/index.tsx @@ -1,6 +1,4 @@ -import { useSystemReleases } from "@/apis/hooks"; -import { QueryOverlay } from "@/components/async"; -import { BuildKey } from "@/utilities"; +import { FunctionComponent, useMemo } from "react"; import { Badge, Card, @@ -12,7 +10,9 @@ import { Text, } from "@mantine/core"; import { useDocumentTitle } from "@mantine/hooks"; -import { FunctionComponent, useMemo } from "react"; +import { useSystemReleases } from "@/apis/hooks"; +import { QueryOverlay } from "@/components/async"; +import { BuildKey } from "@/utilities"; const SystemReleasesView: FunctionComponent = () => { const releases = useSystemReleases(); diff --git a/frontend/src/pages/System/Status/index.tsx b/frontend/src/pages/System/Status/index.tsx index 05996f7ad..bcd0e175d 100644 --- a/frontend/src/pages/System/Status/index.tsx +++ b/frontend/src/pages/System/Status/index.tsx @@ -1,15 +1,10 @@ -import { useSystemHealth, useSystemStatus } from "@/apis/hooks"; -import { QueryOverlay } from "@/components/async"; -import { GithubRepoRoot } from "@/constants"; -import { Environment, useInterval } from "@/utilities"; -import { IconDefinition } from "@fortawesome/fontawesome-common-types"; import { - faDiscord, - faGithub, - faWikipediaW, -} from "@fortawesome/free-brands-svg-icons"; -import { faCode, faPaperPlane } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; + FunctionComponent, + PropsWithChildren, + ReactNode, + useCallback, + useState, +} from "react"; import { Anchor, Container, @@ -20,13 +15,18 @@ import { Text, } from "@mantine/core"; import { useDocumentTitle } from "@mantine/hooks"; +import { IconDefinition } from "@fortawesome/fontawesome-common-types"; import { - FunctionComponent, - PropsWithChildren, - ReactNode, - useCallback, - useState, -} from "react"; + faDiscord, + faGithub, + faWikipediaW, +} from "@fortawesome/free-brands-svg-icons"; +import { faCode, faPaperPlane } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { useSystemHealth, useSystemStatus } from "@/apis/hooks"; +import { QueryOverlay } from "@/components/async"; +import { GithubRepoRoot } from "@/constants"; +import { Environment, useInterval } from "@/utilities"; import { divisorDay, divisorHour, diff --git a/frontend/src/pages/System/Status/table.tsx b/frontend/src/pages/System/Status/table.tsx index c139f9d93..a22f4e435 100644 --- a/frontend/src/pages/System/Status/table.tsx +++ b/frontend/src/pages/System/Status/table.tsx @@ -1,7 +1,7 @@ -import { SimpleTable } from "@/components"; -import { Text } from "@mantine/core"; import { FunctionComponent, useMemo } from "react"; import { Column } from "react-table"; +import { Text } from "@mantine/core"; +import { SimpleTable } from "@/components"; interface Props { health: readonly System.Health[]; diff --git a/frontend/src/pages/System/Tasks/index.tsx b/frontend/src/pages/System/Tasks/index.tsx index 17e429152..b384ea460 100644 --- a/frontend/src/pages/System/Tasks/index.tsx +++ b/frontend/src/pages/System/Tasks/index.tsx @@ -1,10 +1,10 @@ +import { FunctionComponent } from "react"; +import { Container } from "@mantine/core"; +import { useDocumentTitle } from "@mantine/hooks"; +import { faSync } from "@fortawesome/free-solid-svg-icons"; import { useSystemTasks } from "@/apis/hooks"; import { Toolbox } from "@/components"; import { QueryOverlay } from "@/components/async"; -import { faSync } from "@fortawesome/free-solid-svg-icons"; -import { Container } from "@mantine/core"; -import { useDocumentTitle } from "@mantine/hooks"; -import { FunctionComponent } from "react"; import Table from "./table"; const SystemTasksView: FunctionComponent = () => { diff --git a/frontend/src/pages/System/Tasks/table.tsx b/frontend/src/pages/System/Tasks/table.tsx index 064438668..548cc7b70 100644 --- a/frontend/src/pages/System/Tasks/table.tsx +++ b/frontend/src/pages/System/Tasks/table.tsx @@ -1,10 +1,10 @@ +import { FunctionComponent, useMemo } from "react"; +import { Column, useSortBy } from "react-table"; +import { Text } from "@mantine/core"; +import { faPlay } from "@fortawesome/free-solid-svg-icons"; import { useRunTask } from "@/apis/hooks"; import { SimpleTable } from "@/components"; import MutateAction from "@/components/async/MutateAction"; -import { faPlay } from "@fortawesome/free-solid-svg-icons"; -import { Text } from "@mantine/core"; -import { FunctionComponent, useMemo } from "react"; -import { Column, useSortBy } from "react-table"; interface Props { tasks: readonly System.Task[]; diff --git a/frontend/src/pages/Wanted/Movies/index.tsx b/frontend/src/pages/Wanted/Movies/index.tsx index d62871416..e42b6a6dc 100644 --- a/frontend/src/pages/Wanted/Movies/index.tsx +++ b/frontend/src/pages/Wanted/Movies/index.tsx @@ -1,18 +1,18 @@ +import { FunctionComponent, useMemo } from "react"; +import { Link } from "react-router-dom"; +import { Column } from "react-table"; +import { Anchor, Badge, Group } from "@mantine/core"; +import { faSearch } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useMovieAction, useMovieSubtitleModification, useMovieWantedPagination, } from "@/apis/hooks"; import Language from "@/components/bazarr/Language"; -import { TaskGroup, task } from "@/modules/task"; +import { task, TaskGroup } from "@/modules/task"; import WantedView from "@/pages/views/WantedView"; import { BuildKey } from "@/utilities"; -import { faSearch } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Anchor, Badge, Group } from "@mantine/core"; -import { FunctionComponent, useMemo } from "react"; -import { Link } from "react-router-dom"; -import { Column } from "react-table"; const WantedMoviesView: FunctionComponent = () => { const columns: Column<Wanted.Movie>[] = useMemo<Column<Wanted.Movie>[]>( diff --git a/frontend/src/pages/Wanted/Series/index.tsx b/frontend/src/pages/Wanted/Series/index.tsx index d5f4d8993..cc9a22f6e 100644 --- a/frontend/src/pages/Wanted/Series/index.tsx +++ b/frontend/src/pages/Wanted/Series/index.tsx @@ -1,18 +1,18 @@ +import { FunctionComponent, useMemo } from "react"; +import { Link } from "react-router-dom"; +import { Column } from "react-table"; +import { Anchor, Badge, Group } from "@mantine/core"; +import { faSearch } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useEpisodeSubtitleModification, useEpisodeWantedPagination, useSeriesAction, } from "@/apis/hooks"; import Language from "@/components/bazarr/Language"; -import { TaskGroup, task } from "@/modules/task"; +import { task, TaskGroup } from "@/modules/task"; import WantedView from "@/pages/views/WantedView"; import { BuildKey } from "@/utilities"; -import { faSearch } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Anchor, Badge, Group } from "@mantine/core"; -import { FunctionComponent, useMemo } from "react"; -import { Link } from "react-router-dom"; -import { Column } from "react-table"; const WantedSeriesView: FunctionComponent = () => { const columns: Column<Wanted.Episode>[] = useMemo<Column<Wanted.Episode>[]>( diff --git a/frontend/src/pages/errors/CriticalError.tsx b/frontend/src/pages/errors/CriticalError.tsx index 2c8d0202b..22070c2a7 100644 --- a/frontend/src/pages/errors/CriticalError.tsx +++ b/frontend/src/pages/errors/CriticalError.tsx @@ -1,8 +1,8 @@ -import { Reload } from "@/utilities"; +import { FunctionComponent } from "react"; +import { Alert, Container, Text } from "@mantine/core"; import { faExclamationTriangle } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Alert, Container, Text } from "@mantine/core"; -import { FunctionComponent } from "react"; +import { Reload } from "@/utilities"; interface Props { message: string; diff --git a/frontend/src/pages/errors/NotFound.tsx b/frontend/src/pages/errors/NotFound.tsx index d81c31d7f..da4ba8229 100644 --- a/frontend/src/pages/errors/NotFound.tsx +++ b/frontend/src/pages/errors/NotFound.tsx @@ -1,7 +1,7 @@ +import { FunctionComponent } from "react"; +import { Box, Center, Container, Text, Title } from "@mantine/core"; import { faEyeSlash as fasEyeSlash } from "@fortawesome/free-regular-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Box, Center, Container, Text, Title } from "@mantine/core"; -import { FunctionComponent } from "react"; const NotFound: FunctionComponent = () => { return ( diff --git a/frontend/src/pages/errors/UIError.tsx b/frontend/src/pages/errors/UIError.tsx index 55e0d5414..030f6ba11 100644 --- a/frontend/src/pages/errors/UIError.tsx +++ b/frontend/src/pages/errors/UIError.tsx @@ -1,7 +1,4 @@ -import { GithubRepoRoot } from "@/constants"; -import { Reload } from "@/utilities"; -import { faDizzy } from "@fortawesome/free-regular-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { FunctionComponent, useMemo } from "react"; import { Anchor, Box, @@ -13,7 +10,10 @@ import { Text, Title, } from "@mantine/core"; -import { FunctionComponent, useMemo } from "react"; +import { faDizzy } from "@fortawesome/free-regular-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { GithubRepoRoot } from "@/constants"; +import { Reload } from "@/utilities"; const Placeholder = "********"; diff --git a/frontend/src/pages/views/HistoryView.tsx b/frontend/src/pages/views/HistoryView.tsx index 2ecc74afb..3553f58c6 100644 --- a/frontend/src/pages/views/HistoryView.tsx +++ b/frontend/src/pages/views/HistoryView.tsx @@ -1,8 +1,8 @@ -import { UsePaginationQueryResult } from "@/apis/queries/hooks"; -import { QueryPageTable } from "@/components"; +import { Column } from "react-table"; import { Container } from "@mantine/core"; import { useDocumentTitle } from "@mantine/hooks"; -import { Column } from "react-table"; +import { UsePaginationQueryResult } from "@/apis/queries/hooks"; +import { QueryPageTable } from "@/components"; interface Props<T extends History.Base> { name: string; diff --git a/frontend/src/pages/views/ItemOverview.tsx b/frontend/src/pages/views/ItemOverview.tsx index a5224b586..e89100f2e 100644 --- a/frontend/src/pages/views/ItemOverview.tsx +++ b/frontend/src/pages/views/ItemOverview.tsx @@ -1,23 +1,4 @@ -import { Language } from "@/components/bazarr"; -import { BuildKey } from "@/utilities"; -import { - useLanguageProfileBy, - useProfileItemsToLanguages, -} from "@/utilities/languages"; -import { - faFolder, - faBookmark as farBookmark, -} from "@fortawesome/free-regular-svg-icons"; -import { - IconDefinition, - faBookmark, - faClone, - faLanguage, - faMusic, - faStream, - faTags, -} from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { FunctionComponent, useMemo } from "react"; import { BackgroundImage, Badge, @@ -32,7 +13,26 @@ import { Text, Title, } from "@mantine/core"; -import { FunctionComponent, useMemo } from "react"; +import { + faBookmark as farBookmark, + faFolder, +} from "@fortawesome/free-regular-svg-icons"; +import { + faBookmark, + faClone, + faLanguage, + faMusic, + faStream, + faTags, + IconDefinition, +} from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { Language } from "@/components/bazarr"; +import { BuildKey } from "@/utilities"; +import { + useLanguageProfileBy, + useProfileItemsToLanguages, +} from "@/utilities/languages"; interface Props { item: Item.Base | null; diff --git a/frontend/src/pages/views/ItemView.tsx b/frontend/src/pages/views/ItemView.tsx index 8fdaf83c8..e00d330ee 100644 --- a/frontend/src/pages/views/ItemView.tsx +++ b/frontend/src/pages/views/ItemView.tsx @@ -1,8 +1,8 @@ -import { UsePaginationQueryResult } from "@/apis/queries/hooks"; -import { QueryPageTable, Toolbox } from "@/components"; -import { faList } from "@fortawesome/free-solid-svg-icons"; import { useNavigate } from "react-router-dom"; import { Column } from "react-table"; +import { faList } from "@fortawesome/free-solid-svg-icons"; +import { UsePaginationQueryResult } from "@/apis/queries/hooks"; +import { QueryPageTable, Toolbox } from "@/components"; interface Props<T extends Item.Base = Item.Base> { query: UsePaginationQueryResult<T>; diff --git a/frontend/src/pages/views/MassEditor.tsx b/frontend/src/pages/views/MassEditor.tsx index ddab269bd..e2485b39d 100644 --- a/frontend/src/pages/views/MassEditor.tsx +++ b/frontend/src/pages/views/MassEditor.tsx @@ -1,15 +1,15 @@ +import { useCallback, useMemo, useState } from "react"; +import { UseMutationResult } from "react-query"; +import { useNavigate } from "react-router-dom"; +import { Column, useRowSelect } from "react-table"; +import { Box, Container } from "@mantine/core"; +import { faCheck, faUndo } from "@fortawesome/free-solid-svg-icons"; +import { uniqBy } from "lodash"; import { useIsAnyMutationRunning, useLanguageProfiles } from "@/apis/hooks"; import { SimpleTable, Toolbox } from "@/components"; import { Selector, SelectorOption } from "@/components/inputs"; import { useCustomSelection } from "@/components/tables/plugins"; import { GetItemId, useSelectorOptions } from "@/utilities"; -import { faCheck, faUndo } from "@fortawesome/free-solid-svg-icons"; -import { Box, Container } from "@mantine/core"; -import { uniqBy } from "lodash"; -import { useCallback, useMemo, useState } from "react"; -import { UseMutationResult } from "react-query"; -import { useNavigate } from "react-router-dom"; -import { Column, useRowSelect } from "react-table"; interface MassEditorProps<T extends Item.Base = Item.Base> { columns: Column<T>[]; diff --git a/frontend/src/pages/views/WantedView.tsx b/frontend/src/pages/views/WantedView.tsx index 5605bf337..aa71775ac 100644 --- a/frontend/src/pages/views/WantedView.tsx +++ b/frontend/src/pages/views/WantedView.tsx @@ -1,10 +1,10 @@ +import { Column } from "react-table"; +import { Container } from "@mantine/core"; +import { useDocumentTitle } from "@mantine/hooks"; +import { faSearch } from "@fortawesome/free-solid-svg-icons"; import { useIsAnyActionRunning } from "@/apis/hooks"; import { UsePaginationQueryResult } from "@/apis/queries/hooks"; import { QueryPageTable, Toolbox } from "@/components"; -import { faSearch } from "@fortawesome/free-solid-svg-icons"; -import { Container } from "@mantine/core"; -import { useDocumentTitle } from "@mantine/hooks"; -import { Column } from "react-table"; interface Props<T extends Wanted.Base> { name: string; |