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 : (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?.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}
onkeydown={(e) => e.key === 'Enter' && startEdit(cat.id, cat.name)}>
{cat.mangas?.length ?? 0} manga
{/if}
{/if}
{/if}
{/each}
{#if categories.filter(c => c.id !== 0 && c.name !== 'Completed').length === 0}
No custom folders yet. Create one below.
{/if}
{/if}