Skip to content

Commit

Permalink
🔀 Merge #403 to deploy/rinkeby
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraHuang22 committed Oct 30, 2023
2 parents 0fdda6f + 68c28b1 commit b10ce0f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/IscnUploadedInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
:text="$t('IscnUploaded.guide.title')"
class="text-medium-gray"
/>
<Button preset="plain" text="Download iscn.json" @click="handleClickDownload">
<Button preset="plain" :text="$t('NFTPortal.button.download.iscn')" @click="handleClickDownload">
<template #prepend>
<IconDownload />
</template>
Expand Down
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@
"NFTPortal.button.create": "Create",
"NFTPortal.button.collect": "Collect Now",
"NFTPortal.button.convertToIscn": "Convert Content to Writing NFT",
"NFTPortal.button.download.iscn": "Download iscn.json",
"NFTPortal.button.mint": "Mint NFT",
"NFTPortal.button.next":"Next",
"NFTPortal.button.mintContinueLong": "Continue to mint Writing NFTs",
Expand Down
23 changes: 23 additions & 0 deletions pages/view/_iscnId.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,15 @@
'justify-end',
'w-full',
'pt-[24px]',
'gap-[8px]',
'lg:pt-0',
]"
>
<Button preset="tertiary" :text="$t('NFTPortal.button.download.iscn')" @click="handleClickDownload">
<template #prepend>
<IconDownload />
</template>
</Button>
<Button
preset="secondary"
class="w-full lg:w-auto"
Expand Down Expand Up @@ -467,6 +473,8 @@ import { API_LIKER_NFT_MINT } from '~/constant/api'
import { isCosmosTransactionHash } from '~/utils/cosmos'
import { getIPFSUrlFromISCN } from '~/utils/cosmos/iscn'
import { ISCNRecordWithID } from '~/utils/cosmos/iscn/iscn.type'
import { downloadJSON } from '~/utils/misc'
import {
ISCN_PREFIX,
BIG_DIPPER_TX_BASE_URL,
Expand Down Expand Up @@ -861,5 +869,20 @@ export default class ViewIscnIdPage extends Vue {
}
}
}
handleClickDownload() {
const generateData = {
contentMetadata: {
...this.metadata,
'@type': this.type,
'@context': "http://schema.org/",
},
stakeholders: this.recordData?.stakeholders,
contentFingerprints: this.recordData.contentFingerprints,
recordNotes: '',
}
downloadJSON(generateData, 'iscn.json')
}
}
</script>

0 comments on commit b10ce0f

Please sign in to comment.