-
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Edit NFTs [1/2]: Redo
/settings/nfts
to account for all project NFT…
… states (#4051)
- Loading branch information
1 parent
1a77385
commit b6c93e7
Showing
28 changed files
with
602 additions
and
343 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/components/Create/components/pages/NftRewards/NftAdvancedFormItems.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { t } from '@lingui/macro' | ||
import { Form } from 'antd' | ||
import { JuiceSwitch } from 'components/inputs/JuiceSwitch' | ||
import { | ||
PREVENT_OVERSPENDING_EXPLANATION, | ||
USE_DATASOURCE_FOR_REDEEM_EXPLANATION, | ||
} from 'components/strings' | ||
|
||
export function NftAdvancedFormItems() { | ||
return ( | ||
<> | ||
<Form.Item | ||
name="useDataSourceForRedeem" | ||
extra={USE_DATASOURCE_FOR_REDEEM_EXPLANATION} | ||
> | ||
<JuiceSwitch label={t`Use NFTs for redemptions`} /> | ||
</Form.Item> | ||
<Form.Item | ||
name="preventOverspending" | ||
extra={PREVENT_OVERSPENDING_EXPLANATION} | ||
> | ||
<JuiceSwitch label={t`Prevent NFT overspending`} /> | ||
</Form.Item> | ||
</> | ||
) | ||
} |
100 changes: 100 additions & 0 deletions
100
src/components/Create/components/pages/NftRewards/NftPaymentSuccessFormItems.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
import { EyeOutlined } from '@ant-design/icons' | ||
import { Trans, t } from '@lingui/macro' | ||
import { Form } from 'antd' | ||
import { NftPostPayModal } from 'components/NftRewards/NftPostPayModal' | ||
import TooltipLabel from 'components/TooltipLabel' | ||
import { CreateButton } from 'components/buttons/CreateButton' | ||
import { JuiceTextArea } from 'components/inputs/JuiceTextArea' | ||
import { JuiceInput } from 'components/inputs/JuiceTextInput' | ||
import { useModal } from 'hooks/useModal' | ||
import { useAppSelector } from 'redux/hooks/useAppSelector' | ||
|
||
export function NftPaymentSuccessFormItems({ | ||
hidePreview, | ||
}: { | ||
hidePreview?: boolean | ||
}) { | ||
const postPayModal = useModal() | ||
const postPayModalData = useAppSelector( | ||
state => state.editingV2Project.nftRewards.postPayModal, | ||
) | ||
return ( | ||
<> | ||
<div className="flex flex-col gap-4 pt-3 pb-2"> | ||
<p> | ||
<Trans> | ||
Show your supporters a pop-up with a message and a link after they | ||
receive an NFT. You can use this to direct supporters to your | ||
project's website, a Discord server, or somewhere else. | ||
</Trans> | ||
</p> | ||
<Form.Item | ||
name="postPayMessage" | ||
label={ | ||
<TooltipLabel | ||
label={t`Message`} | ||
tip={ | ||
<Trans> | ||
The message that will be shown to supporters after they | ||
receive an NFT. | ||
</Trans> | ||
} | ||
/> | ||
} | ||
> | ||
<JuiceTextArea autoSize={{ minRows: 4, maxRows: 6 }} /> | ||
</Form.Item> | ||
<Form.Item | ||
name="postPayButtonText" | ||
label={ | ||
<TooltipLabel | ||
label={t`Button label`} | ||
tip={ | ||
<Trans> | ||
The text on the button at the bottom of the pop-up. You can | ||
preview this below. | ||
</Trans> | ||
} | ||
/> | ||
} | ||
> | ||
<JuiceInput /> | ||
</Form.Item> | ||
<Form.Item | ||
name="postPayButtonLink" | ||
label={ | ||
<TooltipLabel | ||
label={t`Button link`} | ||
tip={ | ||
<Trans> | ||
Supporters will be sent to this page if they click the button | ||
on your pop-up. You can preview this below. | ||
</Trans> | ||
} | ||
/> | ||
} | ||
extra={t`If you leave this blank, the button will close the pop-up.`} | ||
> | ||
<JuiceInput prefix={'https://'} /> | ||
</Form.Item> | ||
{hidePreview ? null : ( | ||
<CreateButton | ||
className="max-w-fit border" | ||
disabled={!postPayModalData} | ||
icon={<EyeOutlined />} | ||
onClick={postPayModal.open} | ||
> | ||
Preview | ||
</CreateButton> | ||
)} | ||
</div> | ||
{postPayModalData && ( | ||
<NftPostPayModal | ||
open={postPayModal.visible} | ||
config={postPayModalData} | ||
onClose={postPayModal.close} | ||
/> | ||
)} | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from './NftRewardsPage' | ||
export * from './AddNftCollectionForm' |
Oops, something went wrong.
b6c93e7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
juice-interface-goerli – ./
juice-interface-goerli-git-main-peel.vercel.app
juice-interface-goerli.vercel.app
juice-interface-goerli-peel.vercel.app
goerli.juicebox.money