From 3f15c262ec804013afe7f7bf20f01ccef0bc9d13 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Thu, 12 Sep 2024 21:29:51 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Make=20sure=20files=20are=20not?= =?UTF-8?q?=20broken=20in=20preview=20if=20visibility=20is=20Private?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #1788 --- packages/embeds/js/package.json | 2 +- .../js/src/components/bubbles/GuestBubble.tsx | 8 +++++--- .../fileUpload/components/FileUploadForm.tsx | 19 +++++++++++++++++-- .../inputs/textInput/components/TextInput.tsx | 12 +++++++++++- packages/embeds/js/src/types.ts | 2 ++ packages/embeds/js/src/utils/persist.ts | 18 +++++++++++++++++- packages/embeds/nextjs/package.json | 2 +- packages/embeds/react/package.json | 2 +- 8 files changed, 55 insertions(+), 10 deletions(-) diff --git a/packages/embeds/js/package.json b/packages/embeds/js/package.json index f34b671c49..7339c51644 100644 --- a/packages/embeds/js/package.json +++ b/packages/embeds/js/package.json @@ -1,6 +1,6 @@ { "name": "@typebot.io/js", - "version": "0.3.13", + "version": "0.3.14", "description": "Javascript library to display typebots on your website", "type": "module", "main": "dist/index.js", diff --git a/packages/embeds/js/src/components/bubbles/GuestBubble.tsx b/packages/embeds/js/src/components/bubbles/GuestBubble.tsx index b53d2704fa..b0819c9b8b 100644 --- a/packages/embeds/js/src/components/bubbles/GuestBubble.tsx +++ b/packages/embeds/js/src/components/bubbles/GuestBubble.tsx @@ -67,7 +67,7 @@ const TextGuestBubble = (props: { answer: TextInputSubmitContent }) => { > {(attachment, idx) => ( {`Attached { attachment.type.startsWith('image') ).length > 1 && 'max-w-[90%]' )} - onClick={() => setClickedImageSrc(attachment.url)} + onClick={() => + setClickedImageSrc(attachment.blobUrl ?? attachment.url) + } /> )} @@ -132,7 +134,7 @@ const AudioGuestBubble = (props: { answer: RecordingInputSubmitContent }) => { class="p-2 w-full whitespace-pre-wrap typebot-guest-bubble flex flex-col" data-testid="guest-bubble" > -