mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Add batch delete for performers/tags/studios/movies (#1053)
* Add batch delete for performers/tags/studios/movies * Fix ListFilter styling bug
This commit is contained in:
@@ -2,13 +2,16 @@ import React, { useState } from "react";
|
||||
import _ from "lodash";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import Mousetrap from "mousetrap";
|
||||
import { FindStudiosQueryResult } from "src/core/generated-graphql";
|
||||
import {
|
||||
FindStudiosQueryResult,
|
||||
SlimStudioDataFragment,
|
||||
} from "src/core/generated-graphql";
|
||||
import { useStudiosList } from "src/hooks";
|
||||
import { showWhenSelected } from "src/hooks/ListHook";
|
||||
import { ListFilterModel } from "src/models/list-filter/filter";
|
||||
import { DisplayMode } from "src/models/list-filter/types";
|
||||
import { queryFindStudios } from "src/core/StashService";
|
||||
import { ExportDialog } from "../Shared/ExportDialog";
|
||||
import { queryFindStudios, useStudiosDestroy } from "src/core/StashService";
|
||||
import { ExportDialog, DeleteEntityDialog } from "src/components/Shared";
|
||||
import { StudioCard } from "./StudioCard";
|
||||
|
||||
interface IStudioList {
|
||||
@@ -109,6 +112,19 @@ export const StudioList: React.FC<IStudioList> = ({
|
||||
}
|
||||
}
|
||||
|
||||
const renderDeleteDialog = (
|
||||
selectedStudios: SlimStudioDataFragment[],
|
||||
onClose: (confirmed: boolean) => void
|
||||
) => (
|
||||
<DeleteEntityDialog
|
||||
selected={selectedStudios}
|
||||
onClose={onClose}
|
||||
singularEntity="studio"
|
||||
pluralEntity="studios"
|
||||
destroyMutation={useStudiosDestroy}
|
||||
/>
|
||||
);
|
||||
|
||||
const listData = useStudiosList({
|
||||
renderContent,
|
||||
filterHook,
|
||||
@@ -116,6 +132,7 @@ export const StudioList: React.FC<IStudioList> = ({
|
||||
otherOperations,
|
||||
selectable: true,
|
||||
persistState: !fromParent,
|
||||
renderDeleteDialog,
|
||||
});
|
||||
|
||||
function renderStudios(
|
||||
|
||||
Reference in New Issue
Block a user