mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Various UI fixes (#1502)
* Set/unset existing ids when moving to/from set * Refactor rating banner * Fix overlapping in multi set * Prevent UI crash on bad hierarchical input value
This commit is contained in:
@@ -15,6 +15,7 @@ import { TextUtils } from "src/utils";
|
||||
import { SceneQueue } from "src/models/sceneQueue";
|
||||
import { PerformerPopoverButton } from "../Shared/PerformerPopoverButton";
|
||||
import { GridCard } from "../Shared/GridCard";
|
||||
import { RatingBanner } from "../Shared/RatingBanner";
|
||||
|
||||
interface IScenePreviewProps {
|
||||
isPortrait: boolean;
|
||||
@@ -89,21 +90,6 @@ export const SceneCard: React.FC<ISceneCardProps> = (
|
||||
missingStudioImage ||
|
||||
(config?.data?.configuration.interface.showStudioAsText ?? false);
|
||||
|
||||
function maybeRenderRatingBanner() {
|
||||
if (!props.scene.rating) {
|
||||
return;
|
||||
}
|
||||
return (
|
||||
<div
|
||||
className={`rating-banner ${
|
||||
props.scene.rating ? `rating-${props.scene.rating}` : ""
|
||||
}`}
|
||||
>
|
||||
RATING: {props.scene.rating}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function maybeRenderSceneSpecsOverlay() {
|
||||
return (
|
||||
<div className="scene-specs-overlay">
|
||||
@@ -333,7 +319,7 @@ export const SceneCard: React.FC<ISceneCardProps> = (
|
||||
config.data?.configuration?.interface?.soundOnPreview ?? false
|
||||
}
|
||||
/>
|
||||
{maybeRenderRatingBanner()}
|
||||
<RatingBanner rating={props.scene.rating} />
|
||||
{maybeRenderSceneSpecsOverlay()}
|
||||
</>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user