mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Refresh marker panel on marker create (#2502)
* Update scene markers on create * Improve display of markers without titles * Fix marker title not populating
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
### 🐛 Bug fixes
|
### 🐛 Bug fixes
|
||||||
|
* Fix markers not refreshing after creating new marker. ([#2502](https://github.com/stashapp/stash/pull/2502))
|
||||||
* Fix error when submitting scene draft to stash-box without performers. ([#2515](https://github.com/stashapp/stash/pull/2515))
|
* Fix error when submitting scene draft to stash-box without performers. ([#2515](https://github.com/stashapp/stash/pull/2515))
|
||||||
* Fix incorrect video player positioning on touch-enabled devices. ([#2501](https://github.com/stashapp/stash/issues/2501))
|
* Fix incorrect video player positioning on touch-enabled devices. ([#2501](https://github.com/stashapp/stash/issues/2501))
|
||||||
@@ -310,7 +310,7 @@ export const ScenePlayerScrubber: React.FC<IScenePlayerScrubberProps> = (
|
|||||||
style={getTagStyle(index)}
|
style={getTagStyle(index)}
|
||||||
{...dataAttrs}
|
{...dataAttrs}
|
||||||
>
|
>
|
||||||
{marker.title}
|
{marker.title || marker.primary_tag.name}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -382,6 +382,16 @@ export const MarkerTitleSuggest: React.FC<IMarkerSuggestProps> = (props) => {
|
|||||||
value: item?.title ?? "",
|
value: item?.title ?? "",
|
||||||
}));
|
}));
|
||||||
const initialIds = props.initialMarkerTitle ? [props.initialMarkerTitle] : [];
|
const initialIds = props.initialMarkerTitle ? [props.initialMarkerTitle] : [];
|
||||||
|
|
||||||
|
// add initial value to items if still loading, to ensure existing value
|
||||||
|
// is populated
|
||||||
|
if (loading && initialIds.length > 0) {
|
||||||
|
items.push({
|
||||||
|
label: initialIds[0],
|
||||||
|
value: initialIds[0],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SelectComponent
|
<SelectComponent
|
||||||
isMulti={false}
|
isMulti={false}
|
||||||
|
|||||||
@@ -51,9 +51,9 @@ export const TagLink: React.FC<IProps> = (props: IProps) => {
|
|||||||
title = props.movie.name || "";
|
title = props.movie.name || "";
|
||||||
} else if (props.marker) {
|
} else if (props.marker) {
|
||||||
link = NavUtils.makeSceneMarkerUrl(props.marker);
|
link = NavUtils.makeSceneMarkerUrl(props.marker);
|
||||||
title = `${props.marker.title} - ${TextUtils.secondsToTimestamp(
|
title = `${
|
||||||
props.marker.seconds || 0
|
props.marker.title || props.marker.primary_tag?.name || ""
|
||||||
)}`;
|
} - ${TextUtils.secondsToTimestamp(props.marker.seconds || 0)}`;
|
||||||
} else if (props.gallery) {
|
} else if (props.gallery) {
|
||||||
link = `/galleries/${props.gallery.id}`;
|
link = `/galleries/${props.gallery.id}`;
|
||||||
title = props.gallery.title
|
title = props.gallery.title
|
||||||
|
|||||||
@@ -182,10 +182,12 @@ export const WallItem: React.FC<IWallItemProps> = (props: IWallItemProps) => {
|
|||||||
const renderText = () => {
|
const renderText = () => {
|
||||||
if (!showTextContainer) return;
|
if (!showTextContainer) return;
|
||||||
|
|
||||||
|
const markerTitle = props.sceneMarker?.title;
|
||||||
|
|
||||||
const title = props.sceneMarker
|
const title = props.sceneMarker
|
||||||
? `${props.sceneMarker!.title} - ${TextUtils.secondsToTimestamp(
|
? `${
|
||||||
props.sceneMarker.seconds
|
markerTitle ? `${markerTitle} - ` : ""
|
||||||
)}`
|
}${TextUtils.secondsToTimestamp(props.sceneMarker.seconds)}`
|
||||||
: props.scene?.title ?? "";
|
: props.scene?.title ?? "";
|
||||||
const tags = props.sceneMarker
|
const tags = props.sceneMarker
|
||||||
? [props.sceneMarker.primary_tag, ...props.sceneMarker.tags]
|
? [props.sceneMarker.primary_tag, ...props.sceneMarker.tags]
|
||||||
|
|||||||
@@ -251,6 +251,7 @@ const sceneMarkerMutationImpactedQueries = [
|
|||||||
GQL.FindScenesDocument,
|
GQL.FindScenesDocument,
|
||||||
GQL.FindSceneMarkersDocument,
|
GQL.FindSceneMarkersDocument,
|
||||||
GQL.MarkerStringsDocument,
|
GQL.MarkerStringsDocument,
|
||||||
|
GQL.FindSceneMarkerTagsDocument,
|
||||||
];
|
];
|
||||||
|
|
||||||
export const useSceneMarkerCreate = () =>
|
export const useSceneMarkerCreate = () =>
|
||||||
|
|||||||
Reference in New Issue
Block a user