Updated home

* Main upload button will no longer be "loading" if an error occurs with the API check request.

* It will now show a message asking user to try out the No-JS uploader when JavaScript is disabled.
This commit is contained in:
Bobby Wibowo 2018-04-21 20:14:34 +07:00
parent 674d20c62c
commit 431be5cccd
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
2 changed files with 15 additions and 0 deletions

View File

@ -26,6 +26,9 @@ upload.checkIfPublic = () => {
})
.catch(error => {
console.log(error)
const button = document.getElementById('loginToUpload')
button.className = button.className.replace(' is-loading', '')
button.innerText = 'Error occurred. Reload the page?'
return swal('An error occurred!', 'There was an error with the request, please check the console for more information.', 'error')
})
}

View File

@ -76,4 +76,16 @@
</div>
</div>
</section>
<noscript>
<style>#home { display: none !important; }</style>
<section class="hero is-fullheight has-text-centered">
<div class="hero-body section">
<div class="container">
<p>You have JavaScript disabled, but this page requires JavaScript to function.</p>
<p>Please <a href="nojs">click here</a> if you want to try out our No-JS uploader.</p>
</div>
</div>
</section>
</noscript>
{% endblock %}