From ac1e56aa4129f2919498b3cead16b1d9f05095ef Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 6 Jul 2026 18:13:12 -0500 Subject: [PATCH] refac --- .../components/chat/ChatFilePreview.svelte | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/cptr/frontend/src/lib/components/chat/ChatFilePreview.svelte b/cptr/frontend/src/lib/components/chat/ChatFilePreview.svelte index 02864cb..23db9d4 100644 --- a/cptr/frontend/src/lib/components/chat/ChatFilePreview.svelte +++ b/cptr/frontend/src/lib/components/chat/ChatFilePreview.svelte @@ -115,7 +115,7 @@ {:else if kind === 'video'} -
+
@@ -126,9 +126,10 @@ .preview-box { height: 18rem; - max-height: 52vh; + max-height: 75vh; min-height: 10rem; overflow: hidden; + resize: vertical; background: white; } @@ -145,8 +146,11 @@ } .text-preview { - max-height: 22rem; + height: 18rem; + max-height: 75vh; + min-height: 6rem; overflow: auto; + resize: vertical; padding: 0.875rem 1rem; background: white; } @@ -174,6 +178,14 @@ background: white; } + .video-preview { + height: 18rem; + max-height: 75vh; + min-height: 6rem; + overflow: auto; + resize: vertical; + } + :global(.dark) .media-preview { background: rgba(0, 0, 0, 0.25); } @@ -181,7 +193,9 @@ .media-preview audio, .media-preview video { width: 100%; - max-height: 22rem; + height: 100%; + max-height: 100%; + object-fit: contain; } .preview-state {