fix(F-06): auto-open crop editor after image upload on item detail
Added onCropChange and dominantColor props to ImageUpload in the item detail page, so the crop editor opens automatically after uploading a new image. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -273,9 +273,18 @@ function ItemDetail() {
|
|||||||
<ImageUpload
|
<ImageUpload
|
||||||
value={form.imageFilename}
|
value={form.imageFilename}
|
||||||
imageUrl={imageUrl}
|
imageUrl={imageUrl}
|
||||||
|
dominantColor={item.dominantColor}
|
||||||
onChange={(filename) =>
|
onChange={(filename) =>
|
||||||
setForm((f) => ({ ...f, imageFilename: filename }))
|
setForm((f) => ({ ...f, imageFilename: filename }))
|
||||||
}
|
}
|
||||||
|
onCropChange={(crop) => {
|
||||||
|
updateItem.mutate({
|
||||||
|
id: item.id,
|
||||||
|
cropZoom: crop.zoom,
|
||||||
|
cropX: crop.x,
|
||||||
|
cropY: crop.y,
|
||||||
|
});
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
) : editingCrop && imageUrl ? (
|
) : editingCrop && imageUrl ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user