feat: Add OCR script for PDFs using Ollama and refine document preview navigation and zoom behavior.

This commit is contained in:
2025-12-03 17:07:51 +01:00
parent 186743ee37
commit e46318aee5
6 changed files with 126 additions and 27 deletions
+8 -1
View File
@@ -35,6 +35,10 @@ const DocumentsRouteContent: React.FC = () => {
navigate(target);
}, [navigate]);
const handleDocumentNavigate = useCallback((documentId: string) => {
navigate(`/documents/${documentId}`);
}, [navigate]);
const documentsTablePropsWithNav = useMemo(() => (
surfaceConfig.documentsTableProps
? { ...surfaceConfig.documentsTableProps, onBreadcrumbNavigate: handleHeaderBreadcrumbClick }
@@ -76,7 +80,10 @@ const DocumentsRouteContent: React.FC = () => {
const content = renderSurface();
return (
<DocumentsFilterProvider value={documentsFilter}>
<PreviewProvider ensureDownloadUrl={surfaceConfig.documentsTableProps?.ensureDownloadUrl}>
<PreviewProvider
ensureDownloadUrl={surfaceConfig.documentsTableProps?.ensureDownloadUrl}
onNavigate={handleDocumentNavigate}
>
{content}
</PreviewProvider>
</DocumentsFilterProvider>