import React from 'react' import { Head, Link, useForm, usePage } from '@inertiajs/react' import EnhanceStubWarning from '../../components/enhance/EnhanceStubWarning' export default function EnhanceCreate() { const { props } = usePage() const form = useForm({ image: null, scale: props.options?.scales?.[0]?.value || 2, mode: props.options?.modes?.[0]?.value || 'standard' }) const [previewUrl, setPreviewUrl] = React.useState(null) const [sourceType, setSourceType] = React.useState(props.selectedArtwork ? 'artwork' : 'upload') React.useEffect(() => () => { if (previewUrl) { URL.revokeObjectURL(previewUrl) } }, [previewUrl]) function handleFileChange(event) { const file = event.target.files?.[0] || null form.setData('image', file) if (previewUrl) { URL.revokeObjectURL(previewUrl) } setPreviewUrl(file ? URL.createObjectURL(file) : null) } function submit(event) { event.preventDefault() const action = sourceType === 'artwork' && props.selectedArtwork?.store_url ? props.selectedArtwork.store_url : props.storeUrl form.post(action, { forceFormData: sourceType !== 'artwork', preserveScroll: true, }) } return (

Skinbase Enhance

Create an upscaled image

Large images may take longer to process. The original image will stay unchanged.

Back to jobs
Enhance source
{props.selectedArtwork ? (
) : null}
{sourceType === 'artwork' && props.selectedArtwork ? (
Existing artwork source

{props.selectedArtwork.title}

Use the current artwork source without re-uploading a file. The original artwork remains untouched and the enhanced result will be stored as a separate job output.

View artwork Original stays unchanged
{form.errors.source ?
{form.errors.source}
: null}
) : ( <> {form.errors.image ?
{form.errors.image}
: null} )}
Enhance settings
{(props.options?.scales || []).map((option) => ( ))}
{form.errors.scale ?
{form.errors.scale}
: null}
{(props.options?.modes || []).map((option) => ( ))}
{form.errors.mode ?
{form.errors.mode}
: null}
The original file is preserved separately. Completed outputs can be reviewed and downloaded before you decide how to use them.
) }