Skip to content

Commit

Permalink
feat: Disable click when uploading
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Sep 10, 2022
1 parent cb124ca commit 50f862f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/fibr/templates/upload-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@

const uploadButton = document.getElementById('upload-button');
if (uploadButton) {
uploadButton.disabled = true;
replaceContent(uploadButton, generateThrobber(['throbber-white']));
}

Expand All @@ -417,6 +418,7 @@
} catch (err) {
sliceFileList('file', i);
if (uploadButton) {
uploadButton.disabled = false;
uploadButton.innerHTML = 'Retry';
}
await setUploadStatus(container, 'X', 'danger', err);
Expand Down

0 comments on commit 50f862f

Please sign in to comment.