Find Anime
{ if (e.key === "Enter") { runAniListSearch() } }} on:keydown={(e) => { if (e.key === "Escape") { closeDropdown() } }} required/>
{ runAniListSearch() }}>
Search
{#if isSearching}
{showSlowNotice ? "AniList is slow today, still trying..." : "Searching AniList..."}
{:else if searchError}
Search failed
{searchError}
runAniListSearch()}> Retry search
{:else if !hasSearched && aniSearch.trim().length === 0}
Please enter a search term...
{:else if resultCount() > 0 && aniListSearch}
{#each aniListSearch.data.Page.media as media (media.id)}
goToAnime(media.id)} >
goToAnime(media.id)} >{displayTitle(media)}
{/each}
{:else if hasSearched}
No results found for "{aniSearch.trim()}". Try a different title.
{/if}