feat(ui): update URL without reloading after file upload
Added pushState to update the URL with the mnemonic after file upload, enhancing user experience by reflecting the unique file link in the address bar without reloading the page. This helps in easier sharing and bookmarking of the link.
This commit is contained in:
parent
667b2bd199
commit
91c3e4b547
1 changed files with 1 additions and 0 deletions
|
@ -41,6 +41,7 @@ async function uploadFile() {
|
|||
const downloadUrl = `${
|
||||
window.location.origin
|
||||
}/${data.mnemonic.replaceAll(" ", ".")}`;
|
||||
history.pushState({}, "", `/${data.mnemonic.replaceAll(" ", ".")}`);
|
||||
uploadResult.innerHTML = `Seeding file. Share this mnemonic: <strong>${data.mnemonic}</strong>
|
||||
<br>Note that the file will be available for download only as long as you keep this page open.`;
|
||||
copyButton.style.display = "inline-block";
|
||||
|
|
Loading…
Reference in a new issue