diff --git a/ui/v2.5/src/components/Changelog/versions/v0110.md b/ui/v2.5/src/components/Changelog/versions/v0110.md index 248d0e43b73..f01eaa3c92d 100644 --- a/ui/v2.5/src/components/Changelog/versions/v0110.md +++ b/ui/v2.5/src/components/Changelog/versions/v0110.md @@ -16,6 +16,7 @@ * Optimised scanning process. ([#1816](https://github.com/stashapp/stash/pull/1816)) ### 🐛 Bug fixes +* Fix tiny menu items in scrape menu when a stash-box instance has no name. ([#1889](https://github.com/stashapp/stash/pull/1889)) * Fix creating missing entities removing the incorrect entry from the missing list in the scrape dialog. ([#1890](https://github.com/stashapp/stash/pull/1890)) * Allow creating missing Studio during movie scrape. ([#1899](https://github.com/stashapp/stash/pull/1899)) * Fix image files in folder galleries not being deleting when delete file option is checked. ([#1872](https://github.com/stashapp/stash/pull/1872)) diff --git a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx index 2c44ddadb2b..3ca0b01c019 100644 --- a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx +++ b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx @@ -40,6 +40,7 @@ import { stringToGender, } from "src/utils/gender"; import { ConfigurationContext } from "src/hooks/Config"; +import { stashboxDisplayName } from "src/utils/stashbox"; import { PerformerScrapeDialog } from "./PerformerScrapeDialog"; import PerformerScrapeModal from "./PerformerScrapeModal"; import PerformerStashBoxModal, { IStashBox } from "./PerformerStashBoxModal"; @@ -580,7 +581,7 @@ export const PerformerEditPanel: React.FC = ({ className="minimal" onClick={() => onScraperSelected({ ...s, index })} > - {s.name ?? "Stash-Box"} + {stashboxDisplayName(s.name, index)} ))} {queryableScrapers diff --git a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerStashBoxModal.tsx b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerStashBoxModal.tsx index 734c2be189c..e2cb93e5016 100644 --- a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerStashBoxModal.tsx +++ b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerStashBoxModal.tsx @@ -5,6 +5,7 @@ import { useIntl } from "react-intl"; import * as GQL from "src/core/generated-graphql"; import { Modal, LoadingIndicator } from "src/components/Shared"; +import { stashboxDisplayName } from "src/utils/stashbox"; const CLASSNAME = "PerformerScrapeModal"; const CLASSNAME_LIST = `${CLASSNAME}-list`; @@ -52,7 +53,10 @@ const PerformerStashBoxModal: React.FC = ({ = ({ key={s.endpoint} onClick={() => onScrapeQueryClicked({ stash_box_index: index })} > - {s.name ?? "Stash-Box"} + {stashboxDisplayName(s.name, index)} ))} {queryableScrapers.map((s) => ( @@ -463,7 +464,7 @@ export const SceneEditPanel: React.FC = ({ key={s.endpoint} onClick={() => onScrapeClicked({ stash_box_index: index })} > - {s.name ?? "Stash-Box"} + {stashboxDisplayName(s.name, index)} ))} {fragmentScrapers.map((s) => ( diff --git a/ui/v2.5/src/components/Tagger/context.tsx b/ui/v2.5/src/components/Tagger/context.tsx index 86fb17443e4..9d1a19ca7b1 100644 --- a/ui/v2.5/src/components/Tagger/context.tsx +++ b/ui/v2.5/src/components/Tagger/context.tsx @@ -141,7 +141,7 @@ export const TaggerContext: React.FC = ({ children }) => { sourceInput: { stash_box_index: i, }, - displayName: `stash-box: ${s.name}`, + displayName: `stash-box: ${s.name || `#${i + 1}`}`, supportSceneFragment: true, supportSceneQuery: true, })); diff --git a/ui/v2.5/src/utils/stashbox.ts b/ui/v2.5/src/utils/stashbox.ts new file mode 100644 index 00000000000..a511b4f3fd2 --- /dev/null +++ b/ui/v2.5/src/utils/stashbox.ts @@ -0,0 +1,3 @@ +export function stashboxDisplayName(name: string, index: number) { + return name || `Stash-Box #${index + 1}`; +}