Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TAS-1297] 🚸 Add signing progress for multi-file upload #451

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion components/IscnUploadForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,17 @@
'font-400',
]"
>{{ signDialogError }}</pre>
<pre
v-else
:class="[
'mt-[12px]',
'p-[8px]',
'rounded-[8px]',
'text-center',
'text-[12px]',
'font-400',
]"
>{{ signProgress }} / {{ numberOfSignNeeded }}</pre>
<Divider class="mt-[12px] mb-[8px]" />
<span
v-t="'IscnRegisterForm.signDialog.sign.arweave.uploading'"
Expand Down Expand Up @@ -304,6 +315,8 @@

signDialogError = ''
balance = new BigNumber(0)
numberOfSignNeeded = 0
signProgress = 0

epubMetadataList: any[] = []
modifiedEpubMap: any = {}
Expand Down Expand Up @@ -617,7 +630,7 @@
}
this.epubMetadataList.push(epubMetadata)
} catch (err) {
console.error(err)

Check warning on line 633 in components/IscnUploadForm.vue

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, 18)

Unexpected console statement
}
}

Expand Down Expand Up @@ -837,7 +850,11 @@
try {
this.uploadStatus = 'uploading';
// eslint-disable-next-line no-restricted-syntax
for (const record of this.modifiedFileRecords) {
this.numberOfSignNeeded = this.modifiedFileRecords.length;
this.signProgress = 0;
for (let i = 0; i < this.modifiedFileRecords.length; i += 1) {
const record = this.modifiedFileRecords[i];
this.signProgress = i + 1;
// eslint-disable-next-line no-await-in-loop
await this.submitToArweave(record);
}
Expand Down
Loading