mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Fix scene merge dialog (#3466)
* Handle bad savedFilterIds * Fix scene merge dialog
This commit is contained in:
@@ -243,7 +243,8 @@ const ContentRow: React.FC<IFilterRowProps> = (props: IFilterRowProps) => {
|
|||||||
case "SavedFilter":
|
case "SavedFilter":
|
||||||
const savedFilter = props.allSavedFilters.find(
|
const savedFilter = props.allSavedFilters.find(
|
||||||
(f) =>
|
(f) =>
|
||||||
f.id === (props.content as ISavedFilterRow).savedFilterId.toString()
|
f.id ===
|
||||||
|
(props.content as ISavedFilterRow).savedFilterId?.toString()
|
||||||
);
|
);
|
||||||
if (!savedFilter) return "";
|
if (!savedFilter) return "";
|
||||||
return filterTitle(intl, savedFilter);
|
return filterTitle(intl, savedFilter);
|
||||||
@@ -337,7 +338,10 @@ export const FrontPageConfig: React.FC<IFrontPageConfigProps> = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const existingSavedFilterIDs = currentContent
|
const existingSavedFilterIDs = currentContent
|
||||||
.filter((f) => f.__typename === "SavedFilter")
|
.filter(
|
||||||
|
(f) =>
|
||||||
|
f.__typename === "SavedFilter" && (f as ISavedFilterRow).savedFilterId
|
||||||
|
)
|
||||||
.map((f) => (f as ISavedFilterRow).savedFilterId.toString());
|
.map((f) => (f as ISavedFilterRow).savedFilterId.toString());
|
||||||
|
|
||||||
function addSavedFilter(content?: FrontPageContent) {
|
function addSavedFilter(content?: FrontPageContent) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Form, Col, Row, Button, FormControl, Modal } from "react-bootstrap";
|
import { Form, Col, Row, Button, FormControl } from "react-bootstrap";
|
||||||
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
import * as GQL from "src/core/generated-graphql";
|
import * as GQL from "src/core/generated-graphql";
|
||||||
import { Icon } from "../Shared/Icon";
|
import { Icon } from "../Shared/Icon";
|
||||||
@@ -29,6 +29,7 @@ import {
|
|||||||
} from "./SceneDetails/SceneScrapeDialog";
|
} from "./SceneDetails/SceneScrapeDialog";
|
||||||
import { galleryTitle } from "src/core/galleries";
|
import { galleryTitle } from "src/core/galleries";
|
||||||
import { RatingSystem } from "src/components/Shared/Rating/RatingSystem";
|
import { RatingSystem } from "src/components/Shared/Rating/RatingSystem";
|
||||||
|
import { ModalComponent } from "../Shared/Modal";
|
||||||
|
|
||||||
interface IStashIDsField {
|
interface IStashIDsField {
|
||||||
values: GQL.StashId[];
|
values: GQL.StashId[];
|
||||||
@@ -655,7 +656,7 @@ export const SceneMergeModal: React.FC<ISceneMergeModalProps> = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<ModalComponent
|
||||||
show={show}
|
show={show}
|
||||||
header={title}
|
header={title}
|
||||||
icon={faSignInAlt}
|
icon={faSignInAlt}
|
||||||
@@ -723,6 +724,6 @@ export const SceneMergeModal: React.FC<ISceneMergeModalProps> = ({
|
|||||||
</Form.Group>
|
</Form.Group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</ModalComponent>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user