diff --git a/artifacts/chrome.zip b/artifacts/chrome.zip index 6540c415..1ab90125 100644 Binary files a/artifacts/chrome.zip and b/artifacts/chrome.zip differ diff --git a/src/components/Sidebar/chat/FilePreviewBar.tsx b/src/components/Sidebar/chat/FilePreviewBar.tsx index e8661be5..6de8c3e9 100644 --- a/src/components/Sidebar/chat/FilePreviewBar.tsx +++ b/src/components/Sidebar/chat/FilePreviewBar.tsx @@ -12,22 +12,37 @@ const FilePreviewBar = ({ files, removeFile }: FilePreviewBarProps) => { return (
{files.map((file) => { - const imageUrl = file.src + const handlePreviewImageClick = async () => { + const image = new Image() + image.src = file.src + image.style.maxWidth = '100vw' + image.style.maxHeight = '100vh' + const newTab = window.open() + if (!newTab) return + + const body = newTab.document.body + body.innerHTML = image.outerHTML + body.style.margin = '0' + body.style.display = 'grid' + body.style.placeItems = 'center' + body.style.height = '100vh' + body.style.width = '100vw' + body.style.backgroundColor = '#262626' + } return (
- preview - + {removeFile && (