diff --git a/components/IscnRegisterForm.vue b/components/IscnRegisterForm.vue index 233d17f9..9a7c19ba 100644 --- a/components/IscnRegisterForm.vue +++ b/components/IscnRegisterForm.vue @@ -8,12 +8,7 @@ - - @@ -463,12 +432,6 @@ 'gap-[12px]', ]" > - @@ -146,6 +165,39 @@ :all-exif="displayExifInfo" /> + + + +
{{ signDialogMessage }}
+
{{ signDialogError }}
+ + +
+ + {{ errorMsg }} + + {{ $t('IscnRegisterForm.error.buy') }} + + diff --git a/components/SameAsFieldList.vue b/components/SameAsFieldList.vue index aeedeaf3..ce882d65 100644 --- a/components/SameAsFieldList.vue +++ b/components/SameAsFieldList.vue @@ -33,7 +33,6 @@
diff --git a/locales/en.json b/locales/en.json index cf0ed1e5..39698d51 100644 --- a/locales/en.json +++ b/locales/en.json @@ -186,7 +186,7 @@ "IscnRegisterForm.button.signing": "Waiting for signature", "IscnRegisterForm.button.success": "Success", "IscnRegisterForm.button.upload": "Upload", - "IscnRegisterForm.button.uploading": "Uploading", + "IscnRegisterForm.button.uploading": "Uploading files to Arweave....", "IscnRegisterForm.button.uploadOnly": "Switch to upload only mode", "IscnRegisterForm.button.whitelist": "Apply for Whitelist", "IscnRegisterForm.error.arweave": "Oops. Unable to upload to Arweave. Please try again later.", diff --git a/pages/new/index.vue b/pages/new/index.vue index f592ea60..7abe7099 100644 --- a/pages/new/index.vue +++ b/pages/new/index.vue @@ -32,19 +32,18 @@ v-if="state === 'init'" :step="step" @submit="onSubmitUpload" + @arweaveUploaded="onArweaveIdUpload" /> @@ -118,8 +117,8 @@ export default class NewIndexPage extends Vue { state = 'init' urlIpfsHash = this.$route.query.ipfs_hash || '' - arweaveId = this.$route.query.arweave_id || '' - isUploadOnly = this.$route.query.upload_only === '1' + urlArweaveId = this.$route.query.arweave_id || '' + uploadArweaveList: string[] = [] fileSHA256 = '' fileData = '' fileType = '' @@ -167,17 +166,17 @@ export default class NewIndexPage extends Vue { } async mounted() { - if ((this.urlIpfsHash || this.arweaveId) && this.shouldSkipToMintNFT) { + if ((this.urlIpfsHash || this.urlArweaveId) && this.shouldSkipToMintNFT) { this.state = 'iscn'; let url; - if (this.arweaveId) url = `https://arweave.net/${this.arweaveId}`; + if (this.urlArweaveId) url = `https://arweave.net/${this.urlArweaveId}`; else if (this.urlIpfsHash) url = `https://ipfs.io/ipfs/${this.urlIpfsHash}`; if (url) { const { data, headers } = await this.$axios.get(url, { responseType: 'blob' }) this.urlFileRecords = [{ fileBlob: data as Blob, ipfsHash: this.urlIpfsHash, - arweaveId: this.arweaveId, + arweaveId: this.urlArweaveId, isFileImage: headers['content-type'].startsWith('image'), fileType: headers['content-type'], fileSize: headers['content-length'], @@ -187,16 +186,24 @@ export default class NewIndexPage extends Vue { } } - onSubmitUpload(fileRecords: any[] | []) { + onSubmitUpload({ + fileRecords, + arweaveIds, + }: { + fileRecords: any[] + arweaveIds: string[] + }) { if (fileRecords && fileRecords.length) { this.uploadFileRecords = [...fileRecords] } + if (arweaveIds && arweaveIds.length) { + this.uploadArweaveList = [...arweaveIds] + } this.state = 'iscn' - logTrackerEvent(this, 'ISCNCreate', 'ISCNConfirmFile', '', 1); + logTrackerEvent(this, 'ISCNCreate', 'ISCNConfirmFile', '', 1) } - onArweaveIdUpdate({ arweaveId }: { arweaveId: string }) { - this.arweaveId = arweaveId + onArweaveIdUpload({ arweaveId }: { arweaveId: string }) { logTrackerEvent(this, 'ISCNCreate', 'ISCNFileUploadToARSuccess', arweaveId, 1); } @@ -233,7 +240,7 @@ export default class NewIndexPage extends Vue { handleCreateAnotherButtonClick() { this.state = 'init' this.urlIpfsHash = '' - this.arweaveId = '' + this.urlArweaveId = '' this.fileSHA256 = '' this.fileData = '' this.fileType = ''