{#if summary} {#if summary.files > 0}
{formatBytes(summary.bytes)} {filesLabel(summary.files)} {summary.trash_bytes > 0 ? `· ещё ${formatBytes(summary.trash_bytes)} в корзине` : "на диске"}
{#each groups as item (item.group)} {/each} {#if summary.trash_bytes > 0} {/if}
{#each groups as item (item.group)} {/each}
{/if} {/if} {#if files.length > 0}

Самые тяжёлые

{#if summary && group === null && summary.heavy_files > 0} {filesLabel(summary.heavy_files)} крупнее {formatBytes(summary.heavy_threshold)} = {formatBytes(summary.heavy_bytes)} {/if}
{/if}
{#each files as file, index (file.media_id)} open(index)} ontoggle={() => toggle(file.media_id)} refetchable={file.refetchable} selected={selected.has(file.media_id)} size={file.file_size} src={mediaUrl(file.media_id)} sub={chatTitle(file.chat_id)} tail={tail(file)} weight={heaviest > 0 ? file.file_size / heaviest : 0} > {#snippet menu()} open(index)}> Открыть jump(file)}> Перейти к сообщению save(file)}> Скачать файл trash([file.media_id])} > В корзину {/snippet} {/each} {#if loading}
{:else if failed}

Не удалось загрузить хранилище.

{:else if files.length === 0}

{group === null ? "На диске нет скачанных файлов." : "В этой группе нет файлов."}

{:else if !done} {/if}
{#if chosen.length > 0} 0 ? `${chosenGone} не скачать заново` : undefined)} title="{filesLabel(chosen.length)} · {formatBytes(chosenBytes)}" warn > {:else if undo} {:else if problem} {/if}
{ if (item.mediaId !== null) { trash([item.mediaId]); } }} bind:index={viewerIndex} bind:open={viewerOpen} />