Skip to content

Commit

Permalink
Improved scene queue (stashapp#4448)
Browse files Browse the repository at this point in the history
* Improved scene queue
---------
Co-authored-by: WithoutPants <[email protected]>
  • Loading branch information
cj12312021 authored and halkeye committed Sep 1, 2024
1 parent d77d77d commit 528ace0
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 8 deletions.
13 changes: 10 additions & 3 deletions ui/v2.5/src/components/Scenes/SceneDetails/QueueViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,17 @@ export const QueueViewer: React.FC<IPlaylistViewer> = ({
src={scene.paths.screenshot ?? ""}
/>
</div>
<div>
<span className="align-middle text-break">
{objectTitle(scene)}
<div className="queue-scene-details">
<span className="queue-scene-title">{objectTitle(scene)}</span>
<span className="queue-scene-studio">{scene?.studio?.name}</span>
<span className="queue-scene-performers">
{scene?.performers
?.map(function (performer) {
return performer.name;
})
.join(", ")}
</span>
<span className="queue-scene-date">{scene?.date}</span>
</div>
</div>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion ui/v2.5/src/components/Scenes/SceneDetails/Scene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ const SceneLoader: React.FC<RouteComponentProps<ISceneParams>> = ({
const { scenes } = query.data.findScenes;

// append scenes to scene list
const newScenes = queueScenes.concat(scenes as QueuedScene[]);
const newScenes = queueScenes.concat(scenes);
setQueueScenes(newScenes);
// don't change queue start
return scenes;
Expand Down
69 changes: 66 additions & 3 deletions ui/v2.5/src/components/Scenes/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,34 @@ input[type="range"].blue-slider {
padding-right: 0.25rem;
}

@media (min-width: 1200px) {
#queue-viewer {
.queue-scene-details {
width: 245px;
}

.queue-scene-title,
.queue-scene-studio,
.queue-scene-performers,
.queue-scene-date {
margin-right: auto;
min-width: 245px;
overflow: hidden;
position: relative;
transform: translateX(0);
transition: 2s;
white-space: nowrap;
}

.queue-scene-title:hover,
.queue-scene-studio:hover,
.queue-scene-performers:hover,
.queue-scene-date:hover {
transform: translateX(calc(245px - 100%));
}
}
}

#queue-viewer {
.queue-controls {
align-items: center;
Expand All @@ -550,15 +578,50 @@ input[type="range"].blue-slider {
justify-content: space-between;
position: sticky;
top: 0;
z-index: 100;
}

.queue-scene-details {
display: grid;
overflow: hidden;
position: relative;
}

.queue-scene-title {
font-size: 1.2rem;

@media (max-width: 576px) {
font-size: 1rem;
}
}

.queue-scene-studio {
color: #d3d0d0;
font-weight: 600;
}

.queue-scene-performers,
.queue-scene-date {
color: #d3d0d0;
font-size: 0.9rem;
font-weight: 400;

@media (max-width: 576px) {
font-size: 0.8rem;
}
}

.thumbnail-container {
height: 50px;
height: 80px;
margin-bottom: 5px;
margin-right: 0.75rem;
margin-top: 5px;
min-width: 100px;
width: 100px;
min-width: 142px;
width: 142px;
}

ol {
padding-left: 20px;
}

img {
Expand Down
6 changes: 5 additions & 1 deletion ui/v2.5/src/models/sceneQueue.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { FilterMode, Scene } from "src/core/generated-graphql";
import { ListFilterModel } from "./list-filter/filter";
import { SceneListFilterOptions } from "./list-filter/scenes";
import { INamedObject } from "src/utils/navigation";

export type QueuedScene = Pick<Scene, "id" | "title" | "paths">;
export type QueuedScene = Pick<Scene, "id" | "title" | "date" | "paths"> & {
performers?: INamedObject[] | null;
studio?: INamedObject | null;
};

export interface IPlaySceneOptions {
sceneIndex?: number;
Expand Down

0 comments on commit 528ace0

Please sign in to comment.