Remove Trading Start Time from 1/1 Collections > Collection Details

This commit is contained in:
Serkan Reis 2023-04-03 22:22:27 +03:00
parent a11d0f3bae
commit 9c740d0fb0
2 changed files with 162 additions and 82 deletions

View File

@ -144,15 +144,93 @@ export const CollectionDetails = ({ onChange, uploadMethod, coverImageUrl, minte
<TextInput className="mt-2" {...symbolState} isRequired /> <TextInput className="mt-2" {...symbolState} isRequired />
</div> </div>
<div className={clsx(minterType === 'base' ? 'ml-10' : '')}> <div className={clsx(minterType === 'base' ? 'ml-10' : '')}>
<TextInput className="mt-2" {...externalLinkState} /> <TextInput className={clsx(minterType === 'base' ? 'mt-0' : 'mt-2')} {...externalLinkState} />
<FormControl {/* Currently trading starts immediately for 1/1 Collections */}
className={clsx(minterType === 'base' ? 'mt-12' : 'mt-2')} <Conditional test={minterType !== 'base'}>
htmlId="timestamp" <FormControl
subtitle="Trading start time offset will be set as 2 weeks by default." className={clsx(minterType === 'base' ? 'mt-10' : 'mt-2')}
title="Trading Start Time (optional)" htmlId="timestamp"
> subtitle="Trading start time offset will be set as 2 weeks by default."
<InputDateTime minDate={new Date()} onChange={(date) => setTimestamp(date)} value={timestamp} /> title="Trading Start Time (optional)"
</FormControl> >
<InputDateTime minDate={new Date()} onChange={(date) => setTimestamp(date)} value={timestamp} />
</FormControl>
</Conditional>
<Conditional test={minterType === 'base'}>
<div
className={clsx(minterType === 'base' ? 'flex flex-col -ml-6 space-y-2' : 'flex flex-col space-y-2')}
>
<div>
<div className="flex mt-9 ml-6">
<span className="mt-1 ml-[2px] text-sm first-letter:capitalize">
Does the collection contain explicit content?
</span>
<div className="ml-2 font-bold form-check form-check-inline">
<input
checked={explicit}
className="peer sr-only"
id="explicitRadio1"
name="explicitRadioOptions1"
onClick={() => {
setExplicit(true)
}}
type="radio"
/>
<label
className="inline-block py-1 px-2 text-sm text-gray peer-checked:text-white hover:text-white peer-checked:bg-black hover:rounded-sm peer-checked:border-b-2 hover:border-b-2 peer-checked:border-plumbus hover:border-plumbus cursor-pointer form-check-label"
htmlFor="explicitRadio1"
>
YES
</label>
</div>
<div className="ml-2 font-bold form-check form-check-inline">
<input
checked={!explicit}
className="peer sr-only"
id="explicitRadio2"
name="explicitRadioOptions2"
onClick={() => {
setExplicit(false)
}}
type="radio"
/>
<label
className="inline-block py-1 px-2 text-sm text-gray peer-checked:text-white hover:text-white peer-checked:bg-black hover:rounded-sm peer-checked:border-b-2 hover:border-b-2 peer-checked:border-plumbus hover:border-plumbus cursor-pointer form-check-label"
htmlFor="explicitRadio2"
>
NO
</label>
</div>
</div>
</div>
</div>
<Conditional test={SG721_UPDATABLE_CODE_ID > 0}>
<Tooltip
backgroundColor="bg-blue-500"
label={
<div className="grid grid-flow-row">
<span>
When enabled, the metadata for tokens can be updated after the collection is created until
the collection is frozen by the creator.
</span>
</div>
}
placement="bottom"
>
<div className={clsx('flex flex-col mt-11 space-y-2 w-full form-control')}>
<label className="justify-start cursor-pointer label">
<span className="mr-4 font-bold">Updatable Token Metadata</span>
<input
checked={updatable}
className={`toggle ${updatable ? `bg-stargaze` : `bg-gray-600`}`}
onClick={() => setUpdatable(!updatable)}
type="checkbox"
/>
</label>
</div>
</Tooltip>
</Conditional>
</Conditional>
</div> </div>
</div> </div>
@ -200,82 +278,84 @@ export const CollectionDetails = ({ onChange, uploadMethod, coverImageUrl, minte
<span className="italic font-light ">Waiting for cover image URL to be specified.</span> <span className="italic font-light ">Waiting for cover image URL to be specified.</span>
)} )}
</FormControl> </FormControl>
<div className={clsx(minterType === 'base' ? 'flex flex-col -ml-16 space-y-2' : 'flex flex-col space-y-2')}> <Conditional test={minterType !== 'base'}>
<div> <div className={clsx(minterType === 'base' ? 'flex flex-col -ml-6 space-y-2' : 'flex flex-col space-y-2')}>
<div className="flex mt-4"> <div>
<span className="mt-1 ml-[2px] text-sm first-letter:capitalize"> <div className="flex mt-4">
Does the collection contain explicit content? <span className="mt-1 ml-[2px] text-sm first-letter:capitalize">
</span> Does the collection contain explicit content?
<div className="ml-2 font-bold form-check form-check-inline"> </span>
<input <div className="ml-2 font-bold form-check form-check-inline">
checked={explicit} <input
className="peer sr-only" checked={explicit}
id="explicitRadio1" className="peer sr-only"
name="explicitRadioOptions1" id="explicitRadio1"
onClick={() => { name="explicitRadioOptions1"
setExplicit(true) onClick={() => {
}} setExplicit(true)
type="radio" }}
/> type="radio"
<label />
className="inline-block py-1 px-2 text-sm text-gray peer-checked:text-white hover:text-white peer-checked:bg-black hover:rounded-sm peer-checked:border-b-2 hover:border-b-2 peer-checked:border-plumbus hover:border-plumbus cursor-pointer form-check-label" <label
htmlFor="explicitRadio1" className="inline-block py-1 px-2 text-sm text-gray peer-checked:text-white hover:text-white peer-checked:bg-black hover:rounded-sm peer-checked:border-b-2 hover:border-b-2 peer-checked:border-plumbus hover:border-plumbus cursor-pointer form-check-label"
> htmlFor="explicitRadio1"
YES >
</label> YES
</div> </label>
<div className="ml-2 font-bold form-check form-check-inline"> </div>
<input <div className="ml-2 font-bold form-check form-check-inline">
checked={!explicit} <input
className="peer sr-only" checked={!explicit}
id="explicitRadio2" className="peer sr-only"
name="explicitRadioOptions2" id="explicitRadio2"
onClick={() => { name="explicitRadioOptions2"
setExplicit(false) onClick={() => {
}} setExplicit(false)
type="radio" }}
/> type="radio"
<label />
className="inline-block py-1 px-2 text-sm text-gray peer-checked:text-white hover:text-white peer-checked:bg-black hover:rounded-sm peer-checked:border-b-2 hover:border-b-2 peer-checked:border-plumbus hover:border-plumbus cursor-pointer form-check-label" <label
htmlFor="explicitRadio2" className="inline-block py-1 px-2 text-sm text-gray peer-checked:text-white hover:text-white peer-checked:bg-black hover:rounded-sm peer-checked:border-b-2 hover:border-b-2 peer-checked:border-plumbus hover:border-plumbus cursor-pointer form-check-label"
> htmlFor="explicitRadio2"
NO >
</label> NO
</label>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> <Conditional test={SG721_UPDATABLE_CODE_ID > 0}>
<Conditional test={SG721_UPDATABLE_CODE_ID > 0}> <Tooltip
<Tooltip backgroundColor="bg-blue-500"
backgroundColor="bg-blue-500" label={
label={ <div className="grid grid-flow-row">
<div className="grid grid-flow-row"> <span>
<span> When enabled, the metadata for tokens can be updated after the collection is created until the
When enabled, the metadata for tokens can be updated after the collection is created until the collection is frozen by the creator.
collection is frozen by the creator. </span>
</span> </div>
</div> }
} placement="bottom"
placement="bottom"
>
<div
className={clsx(
minterType === 'base'
? 'flex flex-col -ml-16 space-y-2 w-1/2 form-control'
: 'flex flex-col space-y-2 w-3/4 form-control',
)}
> >
<label className="justify-start cursor-pointer label"> <div
<span className="mr-4 font-bold">Updatable Token Metadata</span> className={clsx(
<input minterType === 'base'
checked={updatable} ? 'flex flex-col -ml-16 space-y-2 w-1/2 form-control'
className={`toggle ${updatable ? `bg-stargaze` : `bg-gray-600`}`} : 'flex flex-col space-y-2 w-3/4 form-control',
onClick={() => setUpdatable(!updatable)} )}
type="checkbox" >
/> <label className="justify-start cursor-pointer label">
</label> <span className="mr-4 font-bold">Updatable Token Metadata</span>
</div> <input
</Tooltip> checked={updatable}
className={`toggle ${updatable ? `bg-stargaze` : `bg-gray-600`}`}
onClick={() => setUpdatable(!updatable)}
type="checkbox"
/>
</label>
</div>
</Tooltip>
</Conditional>
</Conditional> </Conditional>
</FormGroup> </FormGroup>
</div> </div>

View File

@ -504,7 +504,7 @@ const CollectionCreationPage: NextPage = () => {
external_link: collectionDetails?.externalLink, external_link: collectionDetails?.externalLink,
explicit_content: collectionDetails?.explicit, explicit_content: collectionDetails?.explicit,
royalty_info: royaltyInfo, royalty_info: royaltyInfo,
start_trading_time: collectionDetails?.startTradingTime || null, start_trading_time: null, //collectionDetails?.startTradingTime || null,
}, },
}, },
}, },