mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-10-21 00:24:37 -04:00
* grid * Improved multi-select, grid list & view offset. Added gap option & app frame. * List view multi-select * Include multi-select in overview, fix page ref type * Add gap to options panel * Fix drag * Update categories z-index * going pretty well * fix a couple bugs * fix another bug :) * minor improvements * Separate grid activeItem * extra comments * um akshully don't ref during render * show thumbnails yay * cleanup * Clean up * Fix ranges * here it is * fix cols drag * don't enforce selecto context * explorer view selectable * Update index.tsx * Context menu support for multi-select (#1187) * here it is * stopPropagation * cut copy multiple --------- Co-authored-by: nikec <nikec.job@gmail.com> * explorer view selectable * Update index.tsx * items Map * fix renamable * Update inspector * Hide tag assign if empty * fix merge * cleanup * fix un-rendered drag select * fix double click quick preview * update thumbnail * mostly handle multiple select in keybindings * fix ts * remove another todo * move useItemAs hooks to @sd/client * fix thumb controls * multi-select double click * cleaner? * smaller gap --------- Co-authored-by: Jamie Pine <ijamespine@me.com> Co-authored-by: Brendan Allan <brendonovich@outlook.com> Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com> Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com> Co-authored-by: Ericson "Fogo" Soares <ericson.ds999@gmail.com>
41 lines
1.0 KiB
TypeScript
41 lines
1.0 KiB
TypeScript
import { useLibraryMutation } from '@sd/client';
|
|
import { CheckBox, Dialog, Tooltip, UseDialogProps, useDialog } from '@sd/ui';
|
|
import { useZodForm } from '@sd/ui/src/forms';
|
|
|
|
interface Props extends UseDialogProps {
|
|
locationId: number;
|
|
pathIds: number[];
|
|
}
|
|
|
|
export default (props: Props) => {
|
|
const deleteFile = useLibraryMutation('files.deleteFiles');
|
|
|
|
const form = useZodForm();
|
|
|
|
return (
|
|
<Dialog
|
|
form={form}
|
|
onSubmit={form.handleSubmit(() =>
|
|
deleteFile.mutateAsync({
|
|
location_id: props.locationId,
|
|
file_path_ids: props.pathIds
|
|
})
|
|
)}
|
|
dialog={useDialog(props)}
|
|
title="Delete a file"
|
|
description="Warning: This will delete your file forever, we don't have a trash can yet..."
|
|
loading={deleteFile.isLoading}
|
|
ctaLabel="Delete"
|
|
ctaDanger
|
|
className="w-[200px]"
|
|
>
|
|
<Tooltip label="Coming soon">
|
|
<div className="flex items-center pt-2 opacity-50">
|
|
<CheckBox disabled className="!mt-0" />
|
|
<p className="text-sm text-ink-dull">Delete all matching files</p>
|
|
</div>
|
|
</Tooltip>
|
|
</Dialog>
|
|
);
|
|
};
|