mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +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))
|
* Optimised scanning process. ([#1816](https://github.com/stashapp/stash/pull/1816))
|
||||||
|
|
||||||
### 🐛 Bug fixes
|
### 🐛 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))
|
* 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))
|
* 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))
|
* 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,
|
stringToGender,
|
||||||
} from "src/utils/gender";
|
} from "src/utils/gender";
|
||||||
import { ConfigurationContext } from "src/hooks/Config";
|
import { ConfigurationContext } from "src/hooks/Config";
|
||||||
|
import { stashboxDisplayName } from "src/utils/stashbox";
|
||||||
import { PerformerScrapeDialog } from "./PerformerScrapeDialog";
|
import { PerformerScrapeDialog } from "./PerformerScrapeDialog";
|
||||||
import PerformerScrapeModal from "./PerformerScrapeModal";
|
import PerformerScrapeModal from "./PerformerScrapeModal";
|
||||||
import PerformerStashBoxModal, { IStashBox } from "./PerformerStashBoxModal";
|
import PerformerStashBoxModal, { IStashBox } from "./PerformerStashBoxModal";
|
||||||
@@ -580,7 +581,7 @@ export const PerformerEditPanel: React.FC<IPerformerDetails> = ({
|
|||||||
className="minimal"
|
className="minimal"
|
||||||
onClick={() => onScraperSelected({ ...s, index })}
|
onClick={() => onScraperSelected({ ...s, index })}
|
||||||
>
|
>
|
||||||
{s.name ?? "Stash-Box"}
|
{stashboxDisplayName(s.name, index)}
|
||||||
</Dropdown.Item>
|
</Dropdown.Item>
|
||||||
))}
|
))}
|
||||||
{queryableScrapers
|
{queryableScrapers
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useIntl } from "react-intl";
|
|||||||
|
|
||||||
import * as GQL from "src/core/generated-graphql";
|
import * as GQL from "src/core/generated-graphql";
|
||||||
import { Modal, LoadingIndicator } from "src/components/Shared";
|
import { Modal, LoadingIndicator } from "src/components/Shared";
|
||||||
|
import { stashboxDisplayName } from "src/utils/stashbox";
|
||||||
|
|
||||||
const CLASSNAME = "PerformerScrapeModal";
|
const CLASSNAME = "PerformerScrapeModal";
|
||||||
const CLASSNAME_LIST = `${CLASSNAME}-list`;
|
const CLASSNAME_LIST = `${CLASSNAME}-list`;
|
||||||
@@ -52,7 +53,10 @@ const PerformerStashBoxModal: React.FC<IProps> = ({
|
|||||||
<Modal
|
<Modal
|
||||||
show
|
show
|
||||||
onHide={onHide}
|
onHide={onHide}
|
||||||
header={`Scrape performer from ${instance.name ?? "Stash-Box"}`}
|
header={`Scrape performer from ${stashboxDisplayName(
|
||||||
|
instance.name,
|
||||||
|
instance.index
|
||||||
|
)}`}
|
||||||
accept={{
|
accept={{
|
||||||
text: intl.formatMessage({ id: "actions.cancel" }),
|
text: intl.formatMessage({ id: "actions.cancel" }),
|
||||||
onClick: onHide,
|
onClick: onHide,
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import { MovieSelect } from "src/components/Shared/Select";
|
|||||||
import { useFormik } from "formik";
|
import { useFormik } from "formik";
|
||||||
import { Prompt } from "react-router";
|
import { Prompt } from "react-router";
|
||||||
import { ConfigurationContext } from "src/hooks/Config";
|
import { ConfigurationContext } from "src/hooks/Config";
|
||||||
|
import { stashboxDisplayName } from "src/utils/stashbox";
|
||||||
import { SceneMovieTable } from "./SceneMovieTable";
|
import { SceneMovieTable } from "./SceneMovieTable";
|
||||||
import { RatingStars } from "./RatingStars";
|
import { RatingStars } from "./RatingStars";
|
||||||
import { SceneScrapeDialog } from "./SceneScrapeDialog";
|
import { SceneScrapeDialog } from "./SceneScrapeDialog";
|
||||||
@@ -396,7 +397,7 @@ export const SceneEditPanel: React.FC<IProps> = ({
|
|||||||
key={s.endpoint}
|
key={s.endpoint}
|
||||||
onClick={() => onScrapeQueryClicked({ stash_box_index: index })}
|
onClick={() => onScrapeQueryClicked({ stash_box_index: index })}
|
||||||
>
|
>
|
||||||
{s.name ?? "Stash-Box"}
|
{stashboxDisplayName(s.name, index)}
|
||||||
</Dropdown.Item>
|
</Dropdown.Item>
|
||||||
))}
|
))}
|
||||||
{queryableScrapers.map((s) => (
|
{queryableScrapers.map((s) => (
|
||||||
@@ -463,7 +464,7 @@ export const SceneEditPanel: React.FC<IProps> = ({
|
|||||||
key={s.endpoint}
|
key={s.endpoint}
|
||||||
onClick={() => onScrapeClicked({ stash_box_index: index })}
|
onClick={() => onScrapeClicked({ stash_box_index: index })}
|
||||||
>
|
>
|
||||||
{s.name ?? "Stash-Box"}
|
{stashboxDisplayName(s.name, index)}
|
||||||
</Dropdown.Item>
|
</Dropdown.Item>
|
||||||
))}
|
))}
|
||||||
{fragmentScrapers.map((s) => (
|
{fragmentScrapers.map((s) => (
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ export const TaggerContext: React.FC = ({ children }) => {
|
|||||||
sourceInput: {
|
sourceInput: {
|
||||||
stash_box_index: i,
|
stash_box_index: i,
|
||||||
},
|
},
|
||||||
displayName: `stash-box: ${s.name}`,
|
displayName: `stash-box: ${s.name || `#${i + 1}`}`,
|
||||||
supportSceneFragment: true,
|
supportSceneFragment: true,
|
||||||
supportSceneQuery: 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