Show error message when the server asks for a captcha

This commit is contained in:
2024-01-08 20:22:13 +01:00
parent f5d6033ffd
commit 42f1541f09

View File

@@ -75,6 +75,10 @@ export const download_file = () => {
) {
captcha_type = "ip_rate_limit"
captcha_window_title = "IP address rate limited"
} else {
captcha_window_title = "CAPTCHA required"
error_code = file.availability
error_message = file.availability_message
}
if (load_captcha_script) {
@@ -117,6 +121,13 @@ export const download_list = () => {
A lot of downloads have originated from this IP address lately.
Please prove that you are not a robot:
</p>
{:else}
<p class="indent">
{error_message}
</p>
<p class="indent">
Reponse code: {error_code}
</p>
{/if}
<br/>
<div bind:this={captcha_container} class="captcha_container"></div>