mirror of
https://github.com/timvisee/send.git
synced 2026-03-05 13:39:54 -05:00
fixed download button multi-click. fixes #927
This commit is contained in:
@@ -22,14 +22,15 @@ module.exports = function(state, emit) {
|
||||
}
|
||||
|
||||
return html`
|
||||
<button class="btn btn--download ${btnClass}"
|
||||
<button class="btn btn--download ${btnClass}"
|
||||
onclick=${download}>
|
||||
${btnText}
|
||||
</button>`;
|
||||
|
||||
function download(event) {
|
||||
event.preventDefault();
|
||||
if (downloadState !== 'complete') {
|
||||
event.target.disabled = true;
|
||||
if (downloadState === 'ready') {
|
||||
emit('download', state.fileInfo);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user