diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 02cd38300..22cb7935e 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -9,6 +9,7 @@ * Added not equals/greater than/less than modifiers for resolution criteria. ([#1568](https://github.com/stashapp/stash/pull/1568)) ### 🎨 Improvements +* Added checkboxes to scene list view. ([#1642](https://github.com/stashapp/stash/pull/1642)) * Added keyboard shortcuts for scene queue navigation. ([#1635](https://github.com/stashapp/stash/pull/1635)) * Made performer scrape menu scrollable. ([#1634](https://github.com/stashapp/stash/pull/1634)) * Improve Studio UI. ([#1629](https://github.com/stashapp/stash/pull/1629)) diff --git a/ui/v2.5/src/components/Scenes/SceneList.tsx b/ui/v2.5/src/components/Scenes/SceneList.tsx index 347b0cbf1..65eb6bed0 100644 --- a/ui/v2.5/src/components/Scenes/SceneList.tsx +++ b/ui/v2.5/src/components/Scenes/SceneList.tsx @@ -217,7 +217,14 @@ export const SceneList: React.FC = ({ } if (filter.displayMode === DisplayMode.List) { return ( - + + listData.onSelectChange(id, selected, shiftKey) + } + /> ); } if (filter.displayMode === DisplayMode.Wall) { diff --git a/ui/v2.5/src/components/Scenes/SceneListTable.tsx b/ui/v2.5/src/components/Scenes/SceneListTable.tsx index 0cd73e8b7..c6b20c382 100644 --- a/ui/v2.5/src/components/Scenes/SceneListTable.tsx +++ b/ui/v2.5/src/components/Scenes/SceneListTable.tsx @@ -1,7 +1,7 @@ // @ts-nocheck /* eslint-disable jsx-a11y/control-has-associated-label */ import React from "react"; -import { Table, Button } from "react-bootstrap"; +import { Table, Button, Form } from "react-bootstrap"; import { Link } from "react-router-dom"; import * as GQL from "src/core/generated-graphql"; import { NavUtils, TextUtils } from "src/utils"; @@ -11,6 +11,8 @@ import { FormattedMessage } from "react-intl"; interface ISceneListTableProps { scenes: GQL.SlimSceneDataFragment[]; queue?: SceneQueue; + selectedIds: Set; + onSelectChange: (id: string, selected: boolean, shiftKey: boolean) => void; } export const SceneListTable: React.FC = ( @@ -44,8 +46,29 @@ export const SceneListTable: React.FC = ( ? props.queue.makeLink(scene.id, { sceneIndex: index }) : `/scenes/${scene.id}`; + let shiftKey = false; return ( + + + props.onSelectChange!( + scene.id, + !props.selectedIds.has(scene.id), + shiftKey + ) + } + onClick={( + event: React.MouseEvent + ) => { + // eslint-disable-next-line prefer-destructuring + shiftKey = event.shiftKey; + event.stopPropagation(); + }} + /> + = ( +