diff --git a/app/web/components/PreviewPanel.tsx b/app/web/components/PreviewPanel.tsx index 192191b..b706768 100644 --- a/app/web/components/PreviewPanel.tsx +++ b/app/web/components/PreviewPanel.tsx @@ -500,70 +500,6 @@ export function PreviewPanel({ storyName, fileName, authFetch, onPublish, publis {saving ? "Saving..." : "Save"} - {/* Inline illustration upload for plot files */} - {isPlot && ( -
- - {showIllustrations && ( -
-
illustrationInputRef.current?.click()} - onDragOver={(e) => { e.preventDefault(); e.stopPropagation(); }} - onDrop={(e) => { - e.preventDefault(); - e.stopPropagation(); - const file = e.dataTransfer.files?.[0]; - if (file) uploadIllustration(file); - }} - > - - - {illustrationUploading ? "Uploading..." : "Drop image here or click to browse"} - - WebP/JPEG, max 500KB -
- {illustrationError && ( - {illustrationError} - )} - {uploadedImages.map((img, i) => ( -
- Image uploaded! Copy the markdown below and paste it where you want the illustration to appear in your plot: -
- - ![Scene description]({img.url}) - - -
-
- ))} -
- )} -
- )} )} @@ -769,6 +705,70 @@ export function PreviewPanel({ storyName, fileName, authFetch, onPublish, publis ) : (
+ {/* Inline illustration upload for plot files (Preview tab only) */} + {isPlot && activeTab === "preview" && ( +
+ + {showIllustrations && ( +
+
illustrationInputRef.current?.click()} + onDragOver={(e) => { e.preventDefault(); e.stopPropagation(); }} + onDrop={(e) => { + e.preventDefault(); + e.stopPropagation(); + const file = e.dataTransfer.files?.[0]; + if (file) uploadIllustration(file); + }} + > + + + {illustrationUploading ? "Uploading..." : "Drop image here or click to browse"} + + WebP/JPEG, max 500KB +
+ {illustrationError && ( + {illustrationError} + )} + {uploadedImages.map((img, i) => ( +
+ Image uploaded! Copy the markdown below and paste it where you want the illustration to appear in your plot: +
+ + ![Scene description]({img.url}) + + +
+
+ ))} +
+ )} +
+ )}
{(isGenesis) && ( <> diff --git a/package.json b/package.json index a0cc251..f08a14a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plotlink-ows", - "version": "1.0.32", + "version": "1.0.33", "bin": { "plotlink-ows": "./bin/plotlink-ows.js" },