Library
{#if anims && tabIndicator.width > 0}
{/if} {#each [["library", "Saved"], ["downloaded", "Downloaded"]] as [f, label]}
onTabChange(f)}> {#if f === "library"}
{:else if f === "downloaded"}
{/if} {label}
{counts[f] ?? 0}
{/each} {#each visibleCategories as cat, idx} {#if dragInsertIdx === idx && activeDragKind === "tab"}
{/if}
onTabChange(String(cat.id))} ondragstart={(e) => onTabDragStart(e, cat)} ondragover={(e) => onTabDragOver(e, cat, idx)} ondragleave={onTabDragLeave} ondrop={(e) => onTabDrop(e, cat)} ondragend={onTabDragEnd} >
{cat.name}
{counts[String(cat.id)] ?? 0}
{#if dragInsertIdx === idx + 1 && activeDragKind === "tab" && idx === visibleCategories.length - 1}
{/if} {/each}
onSearchChange((e.target as HTMLInputElement).value)} />
{#if refreshing && refreshProgress.total > 0}
{refreshProgress.finished}/{refreshProgress.total}
{/if}
{#if sortPanelOpen}
Sort
Order by
{#each ALL_SORT_MODES as m}
onSortChange(m)} > {SORT_LABELS[m]} {#if tabSortMode === m} {#if tabSortDir === "asc"}
{:else}
{/if} {/if}
{/each}
{tabSortDir === "asc" ? "Ascending" : "Descending"} {#if tabSortDir === "asc"}
{:else}
{/if}
{/if}