diff --git a/ui/v2.5/src/components/Galleries/GalleryList.tsx b/ui/v2.5/src/components/Galleries/GalleryList.tsx index 2bbc9a6a8..872bf35c5 100644 --- a/ui/v2.5/src/components/Galleries/GalleryList.tsx +++ b/ui/v2.5/src/components/Galleries/GalleryList.tsx @@ -1,9 +1,7 @@ import React from "react"; import { Table } from "react-bootstrap"; import { Link } from "react-router-dom"; -import { - FindGalleriesQueryResult, -} from "src/core/generated-graphql"; +import { FindGalleriesQueryResult } from "src/core/generated-graphql"; import { useGalleriesList } from "src/hooks"; import { ListFilterModel } from "src/models/list-filter/filter"; import { DisplayMode } from "src/models/list-filter/types"; @@ -38,7 +36,10 @@ export const GalleryList: React.FC = () => { {gallery.files.length > 0 ? ( - {gallery.title + {gallery.title ) : ( undefined )} diff --git a/ui/v2.5/src/components/Galleries/GalleryViewer.tsx b/ui/v2.5/src/components/Galleries/GalleryViewer.tsx index 1ae7e26b1..e0295919a 100644 --- a/ui/v2.5/src/components/Galleries/GalleryViewer.tsx +++ b/ui/v2.5/src/components/Galleries/GalleryViewer.tsx @@ -1,5 +1,5 @@ import React, { FunctionComponent, useState } from "react"; -import Lightbox from 'react-images'; +import Lightbox from "react-images"; import Gallery from "react-photo-gallery"; import * as GQL from "src/core/generated-graphql"; @@ -30,8 +30,8 @@ export const GalleryViewer: FunctionComponent = ({ gallery }) => { } const photos = gallery.files.map(file => ({ - src: file.path ?? '', - caption: file.name ?? '' + src: file.path ?? "", + caption: file.name ?? "" })); const thumbs = gallery.files.map(file => ({ src: `${file.path}?thumb=true` || "", @@ -48,7 +48,9 @@ export const GalleryViewer: FunctionComponent = ({ gallery }) => { onClickPrev={gotoPrevious} onClickNext={gotoNext} currentImage={currentImage} - onClickImage={() => window.open(photos[currentImage].src ?? '', "_blank")} + onClickImage={() => + window.open(photos[currentImage].src ?? "", "_blank") + } isOpen={lightboxIsOpen} width={9999} /> diff --git a/ui/v2.5/src/components/Settings/SettingsAboutPanel.tsx b/ui/v2.5/src/components/Settings/SettingsAboutPanel.tsx index 952bba8d0..a630508cc 100644 --- a/ui/v2.5/src/components/Settings/SettingsAboutPanel.tsx +++ b/ui/v2.5/src/components/Settings/SettingsAboutPanel.tsx @@ -4,7 +4,13 @@ import { StashService } from "src/core/StashService"; export const SettingsAboutPanel: React.FC = () => { const { data, error, loading } = StashService.useVersion(); - const { data: dataLatest, error: errorLatest, loading: loadingLatest, refetch, networkStatus } = StashService.useLatestVersion(); + const { + data: dataLatest, + error: errorLatest, + loading: loadingLatest, + refetch, + networkStatus + } = StashService.useLatestVersion(); function maybeRenderTag() { if (!data || !data.version || !data.version.version) { @@ -19,37 +25,45 @@ export const SettingsAboutPanel: React.FC = () => { } function maybeRenderLatestVersion() { - if (!dataLatest || !dataLatest.latestversion || !dataLatest.latestversion.shorthash || !dataLatest.latestversion.url) { return; } + if ( + !dataLatest || + !dataLatest.latestversion || + !dataLatest.latestversion.shorthash || + !dataLatest.latestversion.url + ) { + return; + } if (!data || !data.version || !data.version.hash) { - return ( - <>{dataLatest.latestversion.shorthash} - ); + return <>{dataLatest.latestversion.shorthash}; } if (data.version.hash !== dataLatest.latestversion.shorthash) { return ( <> - {dataLatest.latestversion.shorthash} [NEW] Download + {dataLatest.latestversion.shorthash} [NEW] + Download ); } - return ( - <>{dataLatest.latestversion.shorthash} - ); + return <>{dataLatest.latestversion.shorthash}; } function renderLatestVersion() { - if (!data || !data.version || !data.version.version) { return; } // if there is no "version" latest version check is obviously not supported + if (!data || !data.version || !data.version.version) { + return; + } // if there is no "version" latest version check is obviously not supported return ( - + - +
Latest Version Build Hash: Latest Version Build Hash: {maybeRenderLatestVersion()}
+ +
@@ -84,16 +98,54 @@ export const SettingsAboutPanel: React.FC = () => { - + - + - + - +
Stash home at Github + Stash home at{" "} + + Github + +
Stash Wiki page + Stash{" "} + + Wiki + {" "} + page +
Join our Discord channel + Join our{" "} + + Discord + {" "} + channel +
Support us through Open Collective + Support us through{" "} + + Open Collective + +
@@ -101,7 +153,11 @@ export const SettingsAboutPanel: React.FC = () => { {error && {error.message}} {errorLatest && {errorLatest.message}} {renderVersion()} - {!dataLatest || loadingLatest || networkStatus === 4 ? : <>{renderLatestVersion()}} + {!dataLatest || loadingLatest || networkStatus === 4 ? ( + + ) : ( + <>{renderLatestVersion()} + )} ); }; diff --git a/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx b/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx index 95ff1162c..6a3151f03 100644 --- a/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx +++ b/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx @@ -56,7 +56,9 @@ export const SettingsConfigurationPanel: React.FC = () => { setDatabasePath(conf.general.databasePath); setGeneratedPath(conf.general.generatedPath); setMaxTranscodeSize(conf.general.maxTranscodeSize ?? undefined); - setMaxStreamingTranscodeSize(conf.general.maxStreamingTranscodeSize ?? undefined); + setMaxStreamingTranscodeSize( + conf.general.maxStreamingTranscodeSize ?? undefined + ); setUsername(conf.general.username); setPassword(conf.general.password); setLogFile(conf.general.logFile ?? undefined); diff --git a/ui/v2.5/src/components/Shared/DetailsEditNavbar.tsx b/ui/v2.5/src/components/Shared/DetailsEditNavbar.tsx index c724da4e4..6be81b8a8 100644 --- a/ui/v2.5/src/components/Shared/DetailsEditNavbar.tsx +++ b/ui/v2.5/src/components/Shared/DetailsEditNavbar.tsx @@ -24,10 +24,8 @@ interface IProps { onImageChange: (event: React.FormEvent) => void; // TODO: only for performers. make generic - scrapers?: Pick[]; - onDisplayScraperDialog?: ( - scraper: Pick - ) => void; + scrapers?: Pick[]; + onDisplayScraperDialog?: (scraper: Pick) => void; } export const DetailsEditNavbar: React.FC = (props: IProps) => { @@ -95,9 +93,7 @@ export const DetailsEditNavbar: React.FC = (props: IProps) => { ? props.scrapers.map(s => ( diff --git a/ui/v2.5/src/components/Shared/DurationInput.tsx b/ui/v2.5/src/components/Shared/DurationInput.tsx index e73e7adb6..25d5317aa 100644 --- a/ui/v2.5/src/components/Shared/DurationInput.tsx +++ b/ui/v2.5/src/components/Shared/DurationInput.tsx @@ -11,13 +11,14 @@ interface IProps { } export const DurationInput: React.FC = (props: IProps) => { - const [value, setValue] = useState(DurationUtils.secondsToString(props.numericValue)); + const [value, setValue] = useState( + DurationUtils.secondsToString(props.numericValue) + ); useEffect(() => { setValue(DurationUtils.secondsToString(props.numericValue)); }, [props.numericValue]); - function increment() { let seconds = DurationUtils.stringToSeconds(value); seconds += 1; @@ -66,7 +67,9 @@ export const DurationInput: React.FC = (props: IProps) => { disabled={props.disabled} value={value} onChange={(e: any) => setValue(e.target.value)} - onBlur={() => props.onValueChange(DurationUtils.stringToSeconds(value))} + onBlur={() => + props.onValueChange(DurationUtils.stringToSeconds(value)) + } placeholder="hh:mm:ss" /> diff --git a/ui/v2.5/src/components/Shared/LoadingIndicator.tsx b/ui/v2.5/src/components/Shared/LoadingIndicator.tsx index 51f4e0783..07119f222 100644 --- a/ui/v2.5/src/components/Shared/LoadingIndicator.tsx +++ b/ui/v2.5/src/components/Shared/LoadingIndicator.tsx @@ -1,22 +1,20 @@ -import React from 'react'; -import { Spinner } from 'react-bootstrap'; +import React from "react"; +import { Spinner } from "react-bootstrap"; interface ILoadingProps { - message: string; + message: string; } -const CLASSNAME = 'LoadingIndicator'; +const CLASSNAME = "LoadingIndicator"; const CLASSNAME_MESSAGE = `${CLASSNAME}-message`; const LoadingIndicator: React.FC = ({ message }) => ( -
- - Loading... - -

- { message } -

-
+
+ + Loading... + +

{message}

+
); export default LoadingIndicator; diff --git a/ui/v2.5/src/components/Shared/Select.tsx b/ui/v2.5/src/components/Shared/Select.tsx index f89d01a9a..2276b15ed 100644 --- a/ui/v2.5/src/components/Shared/Select.tsx +++ b/ui/v2.5/src/components/Shared/Select.tsx @@ -41,7 +41,9 @@ interface ISceneGallerySelect { initialId?: string; sceneId: string; onSelect: ( - item: GQL.ValidGalleriesForSceneQuery["validGalleriesForScene"][0] | undefined + item: + | GQL.ValidGalleriesForSceneQuery["validGalleriesForScene"][0] + | undefined ) => void; } @@ -78,9 +80,7 @@ export const SceneGallerySelect: React.FC = props => { interface IScrapePerformerSuggestProps { scraperId: string; - onSelectPerformer: ( - performer: GQL.ScrapedPerformerDataFragment - ) => void; + onSelectPerformer: (performer: GQL.ScrapedPerformerDataFragment) => void; placeholder?: string; } export const ScrapePerformerSuggest: React.FC = props => { @@ -105,8 +105,7 @@ export const ScrapePerformerSuggest: React.FC = pr const onChange = (selectedItems: ValueType