From 7fdab0ad6a857ae490dd3e8b33b060a249f547ee Mon Sep 17 00:00:00 2001 From: Ed McConnell Date: Thu, 5 Dec 2024 17:31:47 -0500 Subject: [PATCH] Second commit for screen cap feature --- app/components/workbench/Preview.tsx | 19 +- .../workbench/ScreenshotSelector.tsx | 349 +++++++++--------- 2 files changed, 187 insertions(+), 181 deletions(-) diff --git a/app/components/workbench/Preview.tsx b/app/components/workbench/Preview.tsx index a8666764..46e4e592 100644 --- a/app/components/workbench/Preview.tsx +++ b/app/components/workbench/Preview.tsx @@ -27,7 +27,7 @@ export const Preview = memo(() => { } const { baseUrl } = activePreview; - + setUrl(baseUrl); setIframeUrl(baseUrl); }, [activePreview, iframeUrl]); @@ -80,19 +80,24 @@ export const Preview = memo(() => { )}
- setIsSelectionMode(!isSelectionMode)} className={isSelectionMode ? 'bg-bolt-elements-background-depth-3' : ''} /> + setIsSelectionMode(!isSelectionMode)} + className={isSelectionMode ? 'bg-bolt-elements-background-depth-3' : ''} + />
- { setUrl(event.target.value); - }} + }} onKeyDown={(event) => { if (event.key === 'Enter' && validateUrl(url)) { setIframeUrl(url); @@ -119,7 +124,11 @@ export const Preview = memo(() => { {activePreview ? ( <>