From 49973eceb123a91f8f19406817152872e6b1cb31 Mon Sep 17 00:00:00 2001 From: wukko Date: Fri, 26 Jul 2024 14:07:23 +0600 Subject: [PATCH] web/omnibox: disable input area when processing & reduce timeout also fixed a typo that broke key spamming protection --- web/src/components/save/Omnibox.svelte | 7 ++++++- web/src/components/save/buttons/DownloadButton.svelte | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/web/src/components/save/Omnibox.svelte b/web/src/components/save/Omnibox.svelte index b2138550..cfff9f83 100644 --- a/web/src/components/save/Omnibox.svelte +++ b/web/src/components/save/Omnibox.svelte @@ -138,13 +138,18 @@ placeholder={$t("save.input.placeholder")} aria-label={$t("a11y.save.linkArea")} data-form-type="other" + disabled={isDisabled} /> {#if $link} ($link = "")} /> {/if} {#if validLink($link)} - + {/if} diff --git a/web/src/components/save/buttons/DownloadButton.svelte b/web/src/components/save/buttons/DownloadButton.svelte index 3d04b804..c2a26a49 100644 --- a/web/src/components/save/buttons/DownloadButton.svelte +++ b/web/src/components/save/buttons/DownloadButton.svelte @@ -54,7 +54,7 @@ // transition back to idle after some period of time. const final: DownloadButtonState[] = ['done', 'error']; if (final.includes(state)) { - setTimeout(() => changeDownloadButton("idle"), 2500); + setTimeout(() => changeDownloadButton("idle"), 1500); } };