diff --git a/ui/v2.5/src/components/Galleries/GalleryDetails/Gallery.tsx b/ui/v2.5/src/components/Galleries/GalleryDetails/Gallery.tsx index cd06049edf8..5e11123e446 100644 --- a/ui/v2.5/src/components/Galleries/GalleryDetails/Gallery.tsx +++ b/ui/v2.5/src/components/Galleries/GalleryDetails/Gallery.tsx @@ -42,6 +42,7 @@ import cx from "classnames"; import { useRatingKeybinds } from "src/hooks/keybinds"; import { ConfigurationContext } from "src/hooks/Config"; import { TruncatedText } from "src/components/Shared/TruncatedText"; +import { PatchComponent } from "src/patch"; interface IProps { gallery: GQL.GalleryDataFragment; @@ -53,6 +54,20 @@ interface IGalleryParams { tab?: string; } +interface IGalleryDropdownItemProps { + galleryId: string; +} + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const _GalleryDropdownItem = (props: IGalleryDropdownItemProps) => { + return null; +}; + +export const GalleryDropdownItem = PatchComponent( + "GalleryDropdownItem", + _GalleryDropdownItem +); + export const GalleryPage: React.FC = ({ gallery, add }) => { const history = useHistory(); const Toast = useToast(); @@ -192,6 +207,7 @@ export const GalleryPage: React.FC = ({ gallery, add }) => { values={{ entityType: intl.formatMessage({ id: "gallery" }) }} /> + ); diff --git a/ui/v2.5/src/components/Images/ImageDetails/Image.tsx b/ui/v2.5/src/components/Images/ImageDetails/Image.tsx index 281fd99c71f..5f692e9c9b4 100644 --- a/ui/v2.5/src/components/Images/ImageDetails/Image.tsx +++ b/ui/v2.5/src/components/Images/ImageDetails/Image.tsx @@ -34,6 +34,7 @@ import TextUtils from "src/utils/text"; import { RatingSystem } from "src/components/Shared/Rating/RatingSystem"; import cx from "classnames"; import { TruncatedText } from "src/components/Shared/TruncatedText"; +import { PatchComponent } from "src/patch"; interface IProps { image: GQL.ImageDataFragment; @@ -43,6 +44,20 @@ interface IImageParams { id: string; } +interface IImageDropdownItemProps { + imageId: string; +} + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const _ImageDropdownItem = (props: IImageDropdownItemProps) => { + return null; +}; + +export const ImageDropdownItem = PatchComponent( + "ImageDropdownItem", + _ImageDropdownItem +); + const ImagePage: React.FC = ({ image }) => { const history = useHistory(); const Toast = useToast(); @@ -196,6 +211,7 @@ const ImagePage: React.FC = ({ image }) => { values={{ entityType: intl.formatMessage({ id: "image" }) }} /> + ); diff --git a/ui/v2.5/src/components/Scenes/SceneDetails/Scene.tsx b/ui/v2.5/src/components/Scenes/SceneDetails/Scene.tsx index 1951a86645b..9ca9ee43fd7 100644 --- a/ui/v2.5/src/components/Scenes/SceneDetails/Scene.tsx +++ b/ui/v2.5/src/components/Scenes/SceneDetails/Scene.tsx @@ -50,6 +50,7 @@ import { useRatingKeybinds } from "src/hooks/keybinds"; import { lazyComponent } from "src/utils/lazyComponent"; import cx from "classnames"; import { TruncatedText } from "src/components/Shared/TruncatedText"; +import { PatchComponent } from "src/patch"; const SubmitStashBoxDraft = lazyComponent( () => import("src/components/Dialogs/SubmitDraft") @@ -82,6 +83,20 @@ const SceneVideoFilterPanel = lazyComponent( () => import("./SceneVideoFilterPanel") ); +interface ISceneDropdownItemProps { + sceneId: string; +} + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const _SceneDropdownItem = (props: ISceneDropdownItemProps) => { + return null; +}; + +export const SceneDropdownItem = PatchComponent( + "SceneDropdownItem", + _SceneDropdownItem +); + const VideoFrameRateResolution: React.FC<{ width?: number; height?: number; @@ -411,6 +426,7 @@ const ScenePage: React.FC = ({ values={{ entityType: intl.formatMessage({ id: "scene" }) }} /> + ); diff --git a/ui/v2.5/src/docs/en/Manual/UIPluginApi.md b/ui/v2.5/src/docs/en/Manual/UIPluginApi.md index fd96cc52dc0..5fbb515a4e2 100644 --- a/ui/v2.5/src/docs/en/Manual/UIPluginApi.md +++ b/ui/v2.5/src/docs/en/Manual/UIPluginApi.md @@ -147,10 +147,12 @@ Returns `void`. - `CountrySelect` - `DateInput` - `FolderSelect` +- `GalleryDropdownItem` - `GalleryIDSelect` - `GallerySelect` - `GallerySelect.sort` - `Icon` +- `ImageDropdownItem` - `ModalSetting` - `MovieIDSelect` - `MovieSelect` @@ -163,6 +165,7 @@ Returns `void`. - `PerformerSelect.sort` - `PluginRoutes` - `SceneCard` +- `SceneDropdownItem` - `SceneCard.Details` - `SceneCard.Image` - `SceneCard.Overlays`