mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Apply scene queuing for all scene listviews (#1332)
* Apply queue population for all scene list views * Add missing localisation strings
This commit is contained in:
@@ -9,6 +9,7 @@ import { Icon, TruncatedText } from "src/components/Shared";
|
||||
|
||||
interface ISceneListTableProps {
|
||||
scenes: GQL.SlimSceneDataFragment[];
|
||||
queue?: SceneQueue;
|
||||
}
|
||||
|
||||
export const SceneListTable: React.FC<ISceneListTableProps> = (
|
||||
@@ -37,52 +38,58 @@ export const SceneListTable: React.FC<ISceneListTableProps> = (
|
||||
)
|
||||
);
|
||||
|
||||
const renderSceneRow = (scene: GQL.SlimSceneDataFragment) => (
|
||||
<tr key={scene.id}>
|
||||
<td>
|
||||
<Link to={`/scenes/${scene.id}`}>
|
||||
<img
|
||||
className="image-thumbnail"
|
||||
alt={scene.title ?? ""}
|
||||
src={scene.paths.screenshot ?? ""}
|
||||
/>
|
||||
</Link>
|
||||
</td>
|
||||
<td className="text-left">
|
||||
<Link to={`/scenes/${scene.id}`}>
|
||||
<h5>
|
||||
<TruncatedText
|
||||
text={scene.title ?? TextUtils.fileNameFromPath(scene.path)}
|
||||
const renderSceneRow = (scene: GQL.SlimSceneDataFragment, index: number) => {
|
||||
const sceneLink = props.queue
|
||||
? props.queue.makeLink(scene.id, { sceneIndex: index })
|
||||
: `/scenes/${scene.id}`;
|
||||
|
||||
return (
|
||||
<tr key={scene.id}>
|
||||
<td>
|
||||
<Link to={sceneLink}>
|
||||
<img
|
||||
className="image-thumbnail"
|
||||
alt={scene.title ?? ""}
|
||||
src={scene.paths.screenshot ?? ""}
|
||||
/>
|
||||
</h5>
|
||||
</Link>
|
||||
</td>
|
||||
<td>{scene.rating ? scene.rating : ""}</td>
|
||||
<td>
|
||||
{scene.file.duration &&
|
||||
TextUtils.secondsToTimestamp(scene.file.duration)}
|
||||
</td>
|
||||
<td>{renderTags(scene.tags)}</td>
|
||||
<td>{renderPerformers(scene.performers)}</td>
|
||||
<td>
|
||||
{scene.studio && (
|
||||
<Link to={NavUtils.makeStudioScenesUrl(scene.studio)}>
|
||||
<h6>{scene.studio.name}</h6>
|
||||
</Link>
|
||||
)}
|
||||
</td>
|
||||
<td>{renderMovies(scene)}</td>
|
||||
<td>
|
||||
{scene.gallery && (
|
||||
<Button className="minimal">
|
||||
<Link to={`/galleries/${scene.gallery.id}`}>
|
||||
<Icon icon="image" />
|
||||
</td>
|
||||
<td className="text-left">
|
||||
<Link to={sceneLink}>
|
||||
<h5>
|
||||
<TruncatedText
|
||||
text={scene.title ?? TextUtils.fileNameFromPath(scene.path)}
|
||||
/>
|
||||
</h5>
|
||||
</Link>
|
||||
</td>
|
||||
<td>{scene.rating ? scene.rating : ""}</td>
|
||||
<td>
|
||||
{scene.file.duration &&
|
||||
TextUtils.secondsToTimestamp(scene.file.duration)}
|
||||
</td>
|
||||
<td>{renderTags(scene.tags)}</td>
|
||||
<td>{renderPerformers(scene.performers)}</td>
|
||||
<td>
|
||||
{scene.studio && (
|
||||
<Link to={NavUtils.makeStudioScenesUrl(scene.studio)}>
|
||||
<h6>{scene.studio.name}</h6>
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
)}
|
||||
</td>
|
||||
<td>{renderMovies(scene)}</td>
|
||||
<td>
|
||||
{scene.gallery && (
|
||||
<Button className="minimal">
|
||||
<Link to={`/galleries/${scene.gallery.id}`}>
|
||||
<Icon icon="image" />
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="row table-list justify-content-center">
|
||||
|
||||
Reference in New Issue
Block a user