From 4add0fc13f273a1a374bf7bd7387e885dfe70732 Mon Sep 17 00:00:00 2001 From: Juliet Date: Tue, 10 Mar 2026 23:33:07 +0000 Subject: [PATCH] animate between views --- web/src/pages/Upload.tsx | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------ 1 file(s) changed, 108 insertion(s)(+), 96 deletion(s)(-) diff --git a/web/src/pages/Upload.tsx b/web/src/pages/Upload.tsx --- a/web/src/pages/Upload.tsx +++ b/web/src/pages/Upload.tsx @@ -3,8 +3,11 @@ import { generateKey, encrypt } from "../lib/crypto"; import { formatBytes } from "../lib/utils"; +const viewClass = "flex flex-col items-center gap-2 sm:gap-3"; +const fadeIn = { animation: "fade-in 0.4s" }; + const btnClass = - "bg-transparent hover:bg-accent/10 border-accent text-accent rounded-md border px-4 py-1.5 font-medium transition-colors"; + "bg-transparent hover:bg-accent/10 active:scale-95 border-accent text-accent rounded-md border px-4 py-1.5 font-medium transition"; const btnStyle = { "font-size": "clamp(1rem, 3vw, 1.5rem)" }; const ghostClass = "text-muted hover:text-text border-none bg-transparent p-0 text-xs"; @@ -247,6 +250,7 @@ + -
+
- - expires in {expiryValue()} - - - +
+ + expires in {expiryValue()} + + + +
- - {progress()}% - - - {status() === "encrypting" - ? "encrypting\u2026" - : "uploading\u2026"} - - +
+ + {progress()}% + + + {status() === "encrypting" + ? "encrypting\u2026" + : "uploading\u2026"} + + +
- +
- {file()!.name} + + {file()!.name} + + + {tooLarge() + ? `${formatBytes(file()!.size)} / ${formatBytes(maxFileSize())}` + : formatBytes(file()!.size)} + - { + e.stopPropagation(); + handleUpload(); + }} > - {tooLarge() - ? `${formatBytes(file()!.size)} / ${formatBytes(maxFileSize())}` - : formatBytes(file()!.size)} - - - - + upload + + +
- - drop a file, or - - - - - up to {formatBytes(maxFileSize())} +
+ + drop a file, or - + + + + up to {formatBytes(maxFileSize())} + + +
-- tangled.sh