Downloads
{#if network.shareFiles > 0}
Sharing {network.shareFiles} files with the network
{#if network.respondedCount > 0}
· answered {network.respondedCount} searches
{/if}
{#if uploads.length > 0}
· {uploads.filter((u) => u.state === "transferring").length} uploading
{/if}
{/if}
{#if uploads.length > 0}
Uploads
{#each uploads as u (u.id)}
{u.name}
to {u.username} ·
{u.state === "transferring" && u.total > 0
? `${((u.sent / u.total) * 100).toFixed(0)}%`
: u.state}
{#if u.state === "transferring"}
{/if}
{/each}
{/if}
{#if items.length === 0}
{#if uploads.length === 0}
No downloads yet
Grab something from Search — files land in your library folder.
{/if}
{:else}
{#if active.length > 0}
Active
{#each active as d (d.id)}
{d.name}
{d.username} · {stateLabel(d)}
{/each}
{/if}
{#if finished.length > 0}
Finished
{#each finished as d (d.id)}
{d.name}
{d.username} ·
{stateLabel(d)}
{#if d.state === "complete" && d.local_path}
[{
title: d.name.replace(/\.[^.]+$/, ""),
path: d.local_path,
}]}
/>
{/if}
{/each}
{/if}
{/if}