{#if loading}

Загрузка…

{:else if error}

{error}

{:else}
{ if (!canUpload) return; e.preventDefault(); dragging = true; }} ondragleave={(e) => { if (!e.currentTarget.contains(e.relatedTarget as Node)) dragging = false; }} ondrop={onDrop} >

{album?.title ?? ''}

{#if canUpload} {/if}
{#if canUpload && photos.length === 0} {:else} { const p = photos[i]; if (p) goto(`/albums/${albumId}/photos/${p.id}`); }} /> {/if} {#if nextCursor}
{/if}
{#if dragging}
Отпустите, чтобы загрузить
{/if} { for (const p of created) { if (!photos.some((x) => x.id === p.id)) photos = [p, ...photos]; } }} />
{/if}