Skip to content

Commit

Permalink
Merge pull request #7927 from Jarsen136/issue-7920
Browse files Browse the repository at this point in the history
feat: Download template in massmint onboard
  • Loading branch information
vikiival authored Nov 3, 2023
2 parents 96049e4 + 03f92e7 commit 8d6af0f
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 4 deletions.
25 changes: 21 additions & 4 deletions components/massmint/OnBoarding.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<template>
<div>
<div class="is-flex is-align-items-center mb-7 px-8">
<div
class="is-size-2-desktop is-size-2-tablet is-size-3-mobile is-flex is-flex-grow-1 is-justify-content-center has-text-weight-bold">
<nuxt-link
:to="'https://hello.kodadot.xyz/tutorial/minting/how-to-mass-mint-nfts'"
class="is-size-2-desktop is-size-2-tablet is-size-3-mobile is-flex is-flex-grow-1 is-justify-content-center has-text-weight-bold"
target="_blank"
rel="nofollow noopener noreferrer">
{{ $t('massmint.onboarding.pageTitle') }}
</div>
</nuxt-link>
<NeoButton
:label="$t('massmint.onboarding.skip')"
icon="arrow-right"
Expand Down Expand Up @@ -51,6 +54,20 @@
descriptionTabs[activeDescriptionTab].fileStructureDescription
"
class="fixed-height white-space-break-spaces-mobile code" />
<div class="is-flex is-justify-content-flex-end mt-2">
<NeoButton
v-safe-href="
`/massmint/template.${activeDescriptionTab.toLowerCase()}`
"
variant="text"
class="has-text-link"
no-shadow
tag="a"
download>
{{ $t('massmint.onboarding.downloadTemplate') }}
<NeoIcon icon="arrow-up-right" />
</NeoButton>
</div>
</div>
</OnBoardingCard>
</div>
Expand Down Expand Up @@ -79,7 +96,7 @@
</template>

<script lang="ts" setup>
import { NeoButton, NeoButtonVariant } from '@kodadot1/brick'
import { NeoButton, NeoButtonVariant, NeoIcon } from '@kodadot1/brick'
import OnBoardingCard from './OnBoardingCard.vue'
import { usePreferencesStore } from '@/stores/preferences'
import { descriptionTabs } from './descriptionTabs'
Expand Down
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,7 @@
"skip": "Skip",
"next": "Next",
"done": "Done",
"downloadTemplate": "Download file template",
"cards": {
"0": {
"title": "Prepare all your files",
Expand Down
5 changes: 5 additions & 0 deletions public/massmint/template.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
file,name,description,price
art1.png,Art #1,Description for the Art #1,1
art2.png,Art #2,Description for the Art #2,1
art3.png,Art #3,Description for the Art #3,1
art4.png,Art #4,Description for the Art #4,1
26 changes: 26 additions & 0 deletions public/massmint/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"file": "art1.png",
"name": "Art #1",
"description": "Description for the Art #1",
"price": 1
},
{
"file": "art2.png",
"name": "Art #2",
"description": "Description for the Art #2",
"price": 1
},
{
"file": "art3.png",
"name": "Art #3",
"description": "Description for the Art #3",
"price": 1
},
{
"file": "art4.png",
"name": "Art #4",
"description": "Description for the Art #4",
"price": 1
}
]
22 changes: 22 additions & 0 deletions public/massmint/template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
file: art1.png
name: Art #1
description: Description for the Art #1
price: 1


file: art2.png
name: Art #2
description: Description for the Art #2
price: 1


file: art3.png
name: Art #3
description: Description for the Art #3
price: 1


file: art4.png
name: Art #4
description: Description for the Art #4
price: 1

0 comments on commit 8d6af0f

Please sign in to comment.