From 6f1d1fa06ea9eb4d4b945850e7d4e22477b7386c Mon Sep 17 00:00:00 2001 From: MisterBeardy Date: Tue, 3 Feb 2026 09:57:50 -0500 Subject: [PATCH] Updated archive view to work after merging with latest 0.1.8b --- frontend/src/pages/ArchivesPage.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frontend/src/pages/ArchivesPage.tsx b/frontend/src/pages/ArchivesPage.tsx index 811acc3b3..6b6de986e 100644 --- a/frontend/src/pages/ArchivesPage.tsx +++ b/frontend/src/pages/ArchivesPage.tsx @@ -96,6 +96,15 @@ function isSlicedFile(filename: string | null | undefined): boolean { return lower.endsWith('.gcode') || lower.includes('.gcode.'); } +function getArchiveFileType(filename: string | null | undefined): string | undefined { + if (!filename) return undefined; + const lower = filename.toLowerCase(); + if (lower.endsWith('.3mf')) return '3mf'; + if (lower.endsWith('.stl')) return 'stl'; + if (lower.endsWith('.gcode') || lower.includes('.gcode.')) return 'gcode'; + return lower.split('.').pop(); +} + // formatDate imported from '../utils/date' - handles UTC conversion function ArchiveCard({ @@ -1037,6 +1046,7 @@ function ArchiveCard({ setShowViewer(false)} /> )} @@ -1832,6 +1842,7 @@ function ArchiveListRow({ setShowViewer(false)} /> )}