Folders are stored as Suwayomi categories. Changes sync across all clients.
{#if catsError}
{catsError}
{/if}
{#if catsLoading}
Loading folders…
{:else}
{#each orderedAllIds as id}
{@const isBuiltin = id === "library" || id === "downloaded"}
{@const isCompleted = id === completedId}
{@const cat = isBuiltin ? null : (store.categories.find(c => String(c.id) === id) ?? null)}
{@const hidden = isHidden(id)}
{#if isBuiltin || cat}
onDragStart(e, id)}
ondragover={(e) => onDragOver(e, id)}
ondragleave={() => { if (dragOverStrId === id) { dragOverStrId = null; dropPosition = null; } }}
ondrop={(e) => onDrop(e, id)}
ondragend={onDragEnd}
>
{#if isCompleted}
{cat?.name ?? "Completed"}
{cat?.mangas?.nodes.length ?? 0} manga
built-in
{:else if isBuiltin}
{#if id === "library"}{:else}{/if}
{id === "library" ? "Saved" : "Downloaded"}
built-in
{:else if cat}
{#if editingId === cat.id}
{ if (e.key === "Enter") commitEdit(); if (e.key === "Escape") { editingId = null; } }}
onblur={commitEdit} use:focusInput />
{:else}
onDragStart(e, id)}
ondragend={onDragEnd}>
{ e.stopPropagation(); startEdit(cat.id, cat.name); }} title="Click to rename">{cat.name}
{cat.mangas?.nodes.length ?? 0} manga
{/if}
{/if}
{/if}
{/each}
{#if store.categories.filter(c => c.id !== 0 && c.name !== "Completed").length === 0}
No custom folders yet. Create one below.
{/if}
{/if}