mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 04:39:58 +00:00
web/omnibox: disable input area when processing & reduce timeout
also fixed a typo that broke key spamming protection
This commit is contained in:
parent
f8d06cf18b
commit
49973eceb1
2 changed files with 7 additions and 2 deletions
|
@ -138,13 +138,18 @@
|
|||
placeholder={$t("save.input.placeholder")}
|
||||
aria-label={$t("a11y.save.linkArea")}
|
||||
data-form-type="other"
|
||||
disabled={isDisabled}
|
||||
/>
|
||||
|
||||
{#if $link}
|
||||
<ClearButton click={() => ($link = "")} />
|
||||
{/if}
|
||||
{#if validLink($link)}
|
||||
<DownloadButton url={$link} bind:this={downloadButton} bind:isDisabled={isDisabled} />
|
||||
<DownloadButton
|
||||
url={$link}
|
||||
bind:this={downloadButton}
|
||||
bind:disabled={isDisabled}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue