diff --git a/ui/v2.5/src/components/Changelog/versions/v0120.md b/ui/v2.5/src/components/Changelog/versions/v0120.md index 8adf8fcbf..819660dc1 100644 --- a/ui/v2.5/src/components/Changelog/versions/v0120.md +++ b/ui/v2.5/src/components/Changelog/versions/v0120.md @@ -7,6 +7,7 @@ * Added forward jump 10 second button to video player. ([#1973](https://github.com/stashapp/stash/pull/1973)) ### 🎨 Improvements +* Made scene phash field in File Info tab a link to show duplicate scenes. ([#2154](https://github.com/stashapp/stash/pull/2154)) * Show Created/Updated dates in scene/image/gallery details pages. ([#2145](https://github.com/stashapp/stash/pull/2145)) * Added support for setting scrapers path in the settings page. ([#2124](https://github.com/stashapp/stash/pull/2124)) * Added keyboard shortcuts to hide scene page sidebar and scene scrubber. ([#2099](https://github.com/stashapp/stash/pull/2099)) diff --git a/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx b/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx index df27545ae..a7a64e461 100644 --- a/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx +++ b/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx @@ -1,7 +1,7 @@ import React from "react"; import { FormattedMessage, FormattedNumber, useIntl } from "react-intl"; import * as GQL from "src/core/generated-graphql"; -import { TextUtils } from "src/utils"; +import { NavUtils, TextUtils } from "src/utils"; import { TextField, URLField } from "src/utils/field"; interface ISceneFileInfoPanelProps { @@ -104,11 +104,14 @@ export const SceneFileInfoPanel: React.FC = ( value={props.scene.checksum} truncate /> - [], @@ -270,6 +271,15 @@ const makeSceneMarkerUrl = ( return `/scenes/${sceneMarker.scene.id}?t=${sceneMarker.seconds}`; }; +const makeScenesPHashMatchUrl = (phash: GQL.Maybe | undefined) => { + if (!phash) return "#"; + const filter = new ListFilterModel(GQL.FilterMode.Scenes); + const criterion = new PhashCriterion(); + criterion.value = phash; + filter.criteria.push(criterion); + return `/scenes?${filter.makeQueryParameters()}`; +}; + const makeGalleryImagesUrl = ( gallery: Partial, extraCriteria?: Criterion[] @@ -302,6 +312,7 @@ export default { makeTagPerformersUrl, makeTagGalleriesUrl, makeTagImagesUrl, + makeScenesPHashMatchUrl, makeSceneMarkerUrl, makeMovieScenesUrl, makeChildStudiosUrl,