web/omnibox: disable input area when processing & reduce timeout

also fixed a typo that broke key spamming protection
This commit is contained in:
wukko 2024-07-26 14:07:23 +06:00
parent f8d06cf18b
commit 49973eceb1
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
2 changed files with 7 additions and 2 deletions

View file

@ -138,13 +138,18 @@
placeholder={$t("save.input.placeholder")} placeholder={$t("save.input.placeholder")}
aria-label={$t("a11y.save.linkArea")} aria-label={$t("a11y.save.linkArea")}
data-form-type="other" data-form-type="other"
disabled={isDisabled}
/> />
{#if $link} {#if $link}
<ClearButton click={() => ($link = "")} /> <ClearButton click={() => ($link = "")} />
{/if} {/if}
{#if validLink($link)} {#if validLink($link)}
<DownloadButton url={$link} bind:this={downloadButton} bind:isDisabled={isDisabled} /> <DownloadButton
url={$link}
bind:this={downloadButton}
bind:disabled={isDisabled}
/>
{/if} {/if}
</div> </div>

View file

@ -54,7 +54,7 @@
// transition back to idle after some period of time. // transition back to idle after some period of time.
const final: DownloadButtonState[] = ['done', 'error']; const final: DownloadButtonState[] = ['done', 'error'];
if (final.includes(state)) { if (final.includes(state)) {
setTimeout(() => changeDownloadButton("idle"), 2500); setTimeout(() => changeDownloadButton("idle"), 1500);
} }
}; };