fileInputRef.current?.click()}
- >
- {images.length > 0 ? (
-
e.stopPropagation()}
+
+ {/* Scrollable content */}
+
+ {/* Header with back button */}
+
+
- ) : (
-
-
-
Upload reference image
-
- Click or drag an image here
-
+
+
+
New Character
+
+
+ {/* Image upload area */}
+
fileInputRef.current?.click()}
+ >
+ {images.length > 0 ? (
e.stopPropagation()}
>
+

+ {!images[0]!.mediaToken && (
+
+
+
+ )}
setIsGalleryOpen(true)}
- className="flex items-center gap-2 rounded-lg bg-base-fg/10 px-3 py-1.5 text-sm text-base-fg/80 transition-colors hover:bg-base-fg/20"
+ onClick={(e) => {
+ e.stopPropagation();
+ removeImage(0);
+ }}
+ className="absolute right-2 top-2 flex h-7 w-7 items-center justify-center rounded-full bg-black/60 text-white/80 opacity-0 transition-all group-hover:opacity-100 hover:bg-red-500"
>
-
- Choose from Library
-
-
fileInputRef.current?.click()}
- className="flex items-center gap-2 rounded-lg bg-base-fg/10 px-3 py-1.5 text-sm text-base-fg/80 transition-colors hover:bg-base-fg/20"
- >
-
- Upload Image
+
-
- )}
-
+ ) : (
+
+
+
Upload reference image
+
+ Click or drag an image here
+
+
e.stopPropagation()}
+ >
+ setIsGalleryOpen(true)}
+ className="flex items-center gap-2 rounded-lg bg-base-fg/10 px-3 py-1.5 text-sm text-base-fg/80 transition-colors hover:bg-base-fg/20"
+ >
+
+ Choose from Library
+
+ fileInputRef.current?.click()}
+ className="flex items-center gap-2 rounded-lg bg-base-fg/10 px-3 py-1.5 text-sm text-base-fg/80 transition-colors hover:bg-base-fg/20"
+ >
+
+ Upload Image
+
+
+
+ )}
+
-
-
- {/* Name input */}
-
- {/* Description input */}
-
-
-
-
- {/* Action buttons */}
-
+ {/* Action buttons — sticky at the bottom */}
+
Cancel