mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-26 14:19:24 +00:00
Rename file
This commit is contained in:
parent
d40fc6a5cf
commit
25ad7b78ba
@ -9,23 +9,21 @@ export interface ReviewFile {
|
|||||||
thumbnail?: string;
|
thumbnail?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ReviewPanelProps {
|
export interface ResultsPreviewProps {
|
||||||
files: ReviewFile[];
|
files: ReviewFile[];
|
||||||
isGeneratingThumbnails?: boolean;
|
isGeneratingThumbnails?: boolean;
|
||||||
onFileClick?: (file: File) => void;
|
onFileClick?: (file: File) => void;
|
||||||
title?: string;
|
|
||||||
emptyMessage?: string;
|
emptyMessage?: string;
|
||||||
loadingMessage?: string;
|
loadingMessage?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ReviewPanel = ({
|
const ResultsPreview = ({
|
||||||
files,
|
files,
|
||||||
isGeneratingThumbnails = false,
|
isGeneratingThumbnails = false,
|
||||||
onFileClick,
|
onFileClick,
|
||||||
title,
|
|
||||||
emptyMessage = "No files to preview",
|
emptyMessage = "No files to preview",
|
||||||
loadingMessage = "Generating previews..."
|
loadingMessage = "Generating previews..."
|
||||||
}: ReviewPanelProps) => {
|
}: ResultsPreviewProps) => {
|
||||||
const [currentIndex, setCurrentIndex] = useState(0);
|
const [currentIndex, setCurrentIndex] = useState(0);
|
||||||
|
|
||||||
const handlePrevious = () => {
|
const handlePrevious = () => {
|
||||||
@ -99,4 +97,4 @@ const ReviewPanel = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ReviewPanel;
|
export default ResultsPreview;
|
@ -3,7 +3,7 @@ import { Button, Stack, Text } from '@mantine/core';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import DownloadIcon from '@mui/icons-material/Download';
|
import DownloadIcon from '@mui/icons-material/Download';
|
||||||
import ErrorNotification from './ErrorNotification';
|
import ErrorNotification from './ErrorNotification';
|
||||||
import ReviewPanel from './ReviewPanel';
|
import ResultsPreview from './ResultsPreview';
|
||||||
import { SuggestedToolsSection } from './SuggestedToolsSection';
|
import { SuggestedToolsSection } from './SuggestedToolsSection';
|
||||||
import { ToolOperationHook } from '../../../hooks/tools/shared/useToolOperation';
|
import { ToolOperationHook } from '../../../hooks/tools/shared/useToolOperation';
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ export function createReviewToolStep<TParams = any>(
|
|||||||
thumbnail: operation.thumbnails[index]
|
thumbnail: operation.thumbnails[index]
|
||||||
})) || [];
|
})) || [];
|
||||||
|
|
||||||
return createStep("Review", {
|
return createStep(t("review", "Review"), {
|
||||||
isVisible: props.isVisible,
|
isVisible: props.isVisible,
|
||||||
_excludeFromCount: true,
|
_excludeFromCount: true,
|
||||||
_noPadding: true
|
_noPadding: true
|
||||||
@ -38,11 +38,10 @@ export function createReviewToolStep<TParams = any>(
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{previewFiles.length > 0 && (
|
{previewFiles.length > 0 && (
|
||||||
<ReviewPanel
|
<ResultsPreview
|
||||||
files={previewFiles}
|
files={previewFiles}
|
||||||
onFileClick={props.onFileClick}
|
onFileClick={props.onFileClick}
|
||||||
isGeneratingThumbnails={operation.isGeneratingThumbnails}
|
isGeneratingThumbnails={operation.isGeneratingThumbnails}
|
||||||
title={props.title || "Review"}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user