diff --git a/paperless-frontend/src/pages/InboxDetailPage.tsx b/paperless-frontend/src/pages/InboxDetailPage.tsx index 48ef39c..8c43a2a 100644 --- a/paperless-frontend/src/pages/InboxDetailPage.tsx +++ b/paperless-frontend/src/pages/InboxDetailPage.tsx @@ -533,10 +533,11 @@ interface DownloadSegmentsDialogProps { fileId: string; fileName: string; documents: DocumentSegment[]; + thumbUrls: Map; onClose: () => void; } -function DownloadSegmentsDialog({ open, fileId, fileName, documents, onClose }: DownloadSegmentsDialogProps) { +function DownloadSegmentsDialog({ open, fileId, fileName, documents, thumbUrls, onClose }: DownloadSegmentsDialogProps) { const [filenames, setFilenames] = useState([]); const [downloading, setDownloading] = useState(null); @@ -605,12 +606,20 @@ function DownloadSegmentsDialog({ open, fileId, fileName, documents, onClose }: >
{documents.map((doc, i) => { - const first = doc.pages[0]; - const last = doc.pages[doc.pages.length - 1]; - const range = first === last ? `Seite ${first}` : `Seiten ${first}–${last}`; + const thumbUrl = thumbUrls.get(doc.pages[0]); return (
- {range} + : null} + placement="right" + mouseEnterDelay={0.2} + > +
+ {thumbUrl + ? + : } +
+
@@ -640,10 +649,11 @@ interface SendEmailDialogProps { fileId: string; fileName: string; documents: DocumentSegment[]; + thumbUrls: Map; onClose: () => void; } -function SendEmailDialog({ open, fileId, fileName, documents, onClose }: SendEmailDialogProps) { +function SendEmailDialog({ open, fileId, fileName, documents, thumbUrls, onClose }: SendEmailDialogProps) { const [form] = Form.useForm(); const [submitting, setSubmitting] = useState(false); const [filenames, setFilenames] = useState([]); @@ -728,12 +738,20 @@ function SendEmailDialog({ open, fileId, fileName, documents, onClose }: SendEma
{documents.map((doc, i) => { - const first = doc.pages[0]; - const last = doc.pages[doc.pages.length - 1]; - const range = first === last ? `Seite ${first}` : `Seiten ${first}–${last}`; + const thumbUrl = thumbUrls.get(doc.pages[0]); return (
- {range} + : null} + placement="right" + mouseEnterDelay={0.2} + > +
+ {thumbUrl + ? + : } +
+
@@ -1566,6 +1584,7 @@ export default function InboxDetailPage() { fileId={file.id} fileName={file.name} documents={documents} + thumbUrls={thumbUrls} onClose={() => setDownloadDialogOpen(false)} /> setEmailDialogOpen(false)} />