{#if appState.activeSource}
appState.activeSource = null}>
Sources
{appState.activeSource.displayName}
{#each (["POPULAR", "LATEST"] as BrowseType[]) as mode}
setMode(mode)}> {mode.charAt(0) + mode.slice(1).toLowerCase()}
{/each} {#if search}
Search
{/if}
e.key === "Enter" && submitSearch()} />
{#if loading}
{#each Array(18) as _}
{/each}
{:else if mangas.length === 0}
No results.
{:else}
{#each mangas as m (m.id)}
{ appState.activeManga = m; appState.navPage = "library"; }} oncontextmenu={(e) => openCtx(e, m)}>
{#if m.inLibrary}
In Library
{/if}
{m.title}
{/each}
{/if} {#if !loading && (page > 1 || hasNextPage)}
page = Math.max(1, page - 1)} disabled={page === 1}>
Prev
{page}
page++} disabled={!hasNextPage}> Next
{/if}
{/if} {#if ctx}
ctx = null} /> {/if}