From 76f02c3b1a1e5ff4b8c92f999b17ed954dfabf25 Mon Sep 17 00:00:00 2001 From: noah Date: Mon, 9 Mar 2026 21:58:37 +0100 Subject: [PATCH] Added local storage upgraded looks --- src/app/convert/page.tsx | 386 ++++++++++++++++++++++++++---------- src/app/page.tsx | 373 ++++++++++++++++++++++------------ src/components/DropZone.tsx | 177 ++++++----------- src/components/FileCard.tsx | 274 ------------------------- src/components/FileRow.tsx | 238 ++++++++++++++++++++++ src/hooks/useFileUpload.ts | 83 +++++++- src/lib/filePersistence.ts | 188 ++++++++++++++++++ 7 files changed, 1078 insertions(+), 641 deletions(-) delete mode 100644 src/components/FileCard.tsx create mode 100644 src/components/FileRow.tsx create mode 100644 src/lib/filePersistence.ts diff --git a/src/app/convert/page.tsx b/src/app/convert/page.tsx index 52baf8a..382fb7b 100644 --- a/src/app/convert/page.tsx +++ b/src/app/convert/page.tsx @@ -4,13 +4,16 @@ import { useState } from 'react'; import { AnimatePresence, motion } from 'framer-motion'; import Link from 'next/link'; import { DropZone } from '@/components/DropZone'; -import { FileCard } from '@/components/FileCard'; +import { FileRow } from '@/components/FileRow'; import { PreviewModal } from '@/components/PreviewModal'; import { useFileUpload } from '@/hooks/useFileUpload'; import { useConversion } from '@/hooks/useConversion'; import { formatFileSize } from '@/lib/utils'; import { UploadedFile } from '@/types'; +/* Number of ghost rows to show below real files */ +const MIN_VISIBLE_ROWS = 8; + export default function ConvertPage() { const { files, @@ -43,6 +46,7 @@ export default function ConvertPage() { ).length; const completedCount = files.filter((f) => f.status === 'done').length; const totalSize = files.reduce((acc, f) => acc + f.size, 0); + const ghostRowCount = Math.max(0, MIN_VISIBLE_ROWS - files.length); return (
@@ -50,126 +54,288 @@ export default function ConvertPage() {
- {/* Header */} -
- - Transmute - Transmute - - - v1.0 / client-side - -
- - {/* Drop Zone */} -