Skip to content

Commit

Permalink
✨ Support minting free wnft (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong authored Aug 1, 2023
1 parent a91f496 commit 7711143
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/NFTMint/WriterMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
>
<span>{{ $t('NFTPortal.label.initialBatch.input') }}</span>
<select ref="batchInput" @change="(e) => $emit('update-initial-batch', e.target.value)">
<option v-for="{ batch, price } in initialBatchOptions" :key="batch" :value="batch">
<option v-for="{ batch, price } in initialBatchOptions" :key="batch" :value="batch" :selected="batch === 0">
{{ price }}
</option>
</select>
Expand Down Expand Up @@ -176,6 +176,7 @@ export default class WriterMessage extends Vue {
shouldShowSettings = false
shouldShowAdvancedSettings = false
initialBatchOptions = [
{ batch: -1, price: this.$t('NFTPortal.label.initialBatch.free') },
{ batch: 0, price: 8 },
{ batch: 4, price: 128 },
{ batch: 7, price: 1024 },
Expand Down
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@
"NFTPortal.label.detailsPage": "NFT Details Page :",
"NFTPortal.label.fileUpload": "Has a file? Upload to ISCN here",
"NFTPortal.label.initialBatch.input": "Initial Price (LIKE)",
"NFTPortal.label.initialBatch.free": "All Free",
"NFTPortal.label.input.email": "Join our community and stay in the loop on exclusive product updates and offers. {link} now!",
"NFTPortal.label.input.link": "Please leave your email",
"NFTPortal.label.Iscn": "ISCN ID",
Expand Down
5 changes: 5 additions & 0 deletions pages/nft/iscn/_iscnId.vue
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,10 @@ export default class NFTTestMintPage extends Vue {
return undefined
}
get isFree() {
return this.initialBatch === -1
}
async mounted() {
try {
await Promise.all([
Expand Down Expand Up @@ -843,6 +847,7 @@ export default class NFTTestMintPage extends Vue {
contentUrl: this.iscnData.contentMetadata?.url,
initialBatch: this.initialBatch,
reservedNftCount: this.reserveNft,
isFree: this.isFree,
},
{
params: {
Expand Down

0 comments on commit 7711143

Please sign in to comment.