diff --git a/components/openEdition/OpenEditionMinterCreator.tsx b/components/openEdition/OpenEditionMinterCreator.tsx index 46e4363..bf2ab74 100644 --- a/components/openEdition/OpenEditionMinterCreator.tsx +++ b/components/openEdition/OpenEditionMinterCreator.tsx @@ -713,7 +713,7 @@ export const OpenEditionMinterCreator = ({ -
+
{ const element = document.createElement('a') const file = new Blob([JSON.stringify(details)], { type: 'text/plain' }) element.href = URL.createObjectURL(file) - element.download = 'details.json' + element.download = `${ + minterType === 'vending' + ? collectionDetails?.name + ? `${collectionDetails.name}-` + : '' + : openEditionMinterDetails?.collectionDetails + ? `${openEditionMinterDetails.collectionDetails.name}-` + : '' + }configuration-${new Date().toLocaleString().replaceAll(',', '_')}.json` document.body.appendChild(element) // Required for this to work in FireFox element.click() } const importDetails = (event: ChangeEvent) => { - if (event.target.files === null) return toast.error('No files selected.') + if (event.target.files === null || event.target.files.length === 0) return toast.error('No files selected.') const file = event.target.files[0] const reader = new FileReader() reader.onload = (e) => { @@ -1408,15 +1417,7 @@ const CollectionCreationPage: NextPage = () => { : 'Create Collection' } /> - - importDetails(e)} - type="file" - /> +

{minterType === 'base' && baseMinterDetails?.baseMinterAcquisitionMethod === 'existing' @@ -1436,6 +1437,7 @@ const CollectionCreationPage: NextPage = () => { on how to create your collection

+
{ className={clsx( 'mx-10 mt-5', 'grid before:absolute relative grid-cols-3 grid-flow-col items-stretch rounded', - 'before:inset-x-0 before:bottom-0 before:border-white/25', + 'before:inset-x-0 before:bottom-0 before:border-white/25', + minterType !== 'base' ? 'rounded-none border-b-2 border-white/25' : 'border-0', )} >
{
+ + +
+ importDetails(e)} + type="file" + /> + +
+
+
+ {minterType === 'base' && (