mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Use a default stash-box name if none provided (#1889)
* Use a default stash-box name if none provided
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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<IPerformerDetails> = ({
|
||||
className="minimal"
|
||||
onClick={() => onScraperSelected({ ...s, index })}
|
||||
>
|
||||
{s.name ?? "Stash-Box"}
|
||||
{stashboxDisplayName(s.name, index)}
|
||||
</Dropdown.Item>
|
||||
))}
|
||||
{queryableScrapers
|
||||
|
||||
@@ -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<IProps> = ({
|
||||
<Modal
|
||||
show
|
||||
onHide={onHide}
|
||||
header={`Scrape performer from ${instance.name ?? "Stash-Box"}`}
|
||||
header={`Scrape performer from ${stashboxDisplayName(
|
||||
instance.name,
|
||||
instance.index
|
||||
)}`}
|
||||
accept={{
|
||||
text: intl.formatMessage({ id: "actions.cancel" }),
|
||||
onClick: onHide,
|
||||
|
||||
@@ -35,6 +35,7 @@ import { MovieSelect } from "src/components/Shared/Select";
|
||||
import { useFormik } from "formik";
|
||||
import { Prompt } from "react-router";
|
||||
import { ConfigurationContext } from "src/hooks/Config";
|
||||
import { stashboxDisplayName } from "src/utils/stashbox";
|
||||
import { SceneMovieTable } from "./SceneMovieTable";
|
||||
import { RatingStars } from "./RatingStars";
|
||||
import { SceneScrapeDialog } from "./SceneScrapeDialog";
|
||||
@@ -396,7 +397,7 @@ export const SceneEditPanel: React.FC<IProps> = ({
|
||||
key={s.endpoint}
|
||||
onClick={() => onScrapeQueryClicked({ stash_box_index: index })}
|
||||
>
|
||||
{s.name ?? "Stash-Box"}
|
||||
{stashboxDisplayName(s.name, index)}
|
||||
</Dropdown.Item>
|
||||
))}
|
||||
{queryableScrapers.map((s) => (
|
||||
@@ -463,7 +464,7 @@ export const SceneEditPanel: React.FC<IProps> = ({
|
||||
key={s.endpoint}
|
||||
onClick={() => onScrapeClicked({ stash_box_index: index })}
|
||||
>
|
||||
{s.name ?? "Stash-Box"}
|
||||
{stashboxDisplayName(s.name, index)}
|
||||
</Dropdown.Item>
|
||||
))}
|
||||
{fragmentScrapers.map((s) => (
|
||||
|
||||
@@ -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,
|
||||
}));
|
||||
|
||||
3
ui/v2.5/src/utils/stashbox.ts
Normal file
3
ui/v2.5/src/utils/stashbox.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export function stashboxDisplayName(name: string, index: number) {
|
||||
return name || `Stash-Box #${index + 1}`;
|
||||
}
|
||||
Reference in New Issue
Block a user