chore(format): run prettier over src/ and scripts/

Formatting was configured but never enforced: `bun run format:check`
reported 199 unformatted files and ran in no workflow and in no git hook,
so .prettierrc (printWidth 100, trailing commas) described an intention
rather than the tree.

This is the one-time sweep that makes the check gateable. Whitespace and
token-reflow only -- no behavioural change: `bun run check` reports 0
errors and all 1053 frontend tests pass before and after.

Kept out of every other commit on purpose. A 199-file diff mixed with
real changes is unreviewable, and the next commit turns format:check
into a hard CI gate so this cannot silently accumulate again.
This commit is contained in:
2026-08-21 17:41:44 +02:00
parent d095e1f410
commit ad48d89dfe
199 changed files with 4698 additions and 3453 deletions
+33 -11
View File
@@ -16,7 +16,13 @@
<script lang="ts">
import { onMount } from "svelte";
import { goto } from "$app/navigation";
import { downloads, activeDownloads, pendingDownloads, failedDownloads, waitingForNetwork } from "$lib/stores/downloads";
import {
downloads,
activeDownloads,
pendingDownloads,
failedDownloads,
waitingForNetwork,
} from "$lib/stores/downloads";
import { areDownloadsAllowed } from "$lib/services/networkType";
import { auth } from "$lib/stores/auth";
import DownloadItem from "$lib/components/downloads/DownloadItem.svelte";
@@ -53,9 +59,7 @@
// Transfers = everything still in flight or waiting. Completed rows are
// deliberately excluded — they live in Downloaded, not here.
const transfers = $derived(
$activeDownloads.concat($pendingDownloads).concat($failedDownloads)
);
const transfers = $derived($activeDownloads.concat($pendingDownloads).concat($failedDownloads));
async function pauseAll() {
for (const download of $activeDownloads) {
@@ -142,16 +146,28 @@
{:else}
<!-- WiFi-only gate notice (UR-053): explains an otherwise stuck-looking queue -->
{#if $waitingForNetwork && transfers.length > 0}
<div class="flex items-start gap-3 rounded-lg border border-amber-700 bg-amber-900/20 p-4" role="status">
<svg class="mt-0.5 h-5 w-5 shrink-0 text-amber-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 18h.01M8.111 15.111a5.5 5.5 0 017.778 0M4.929 11.929a10 10 0 0114.142 0M12 21h.01" />
<div
class="flex items-start gap-3 rounded-lg border border-amber-700 bg-amber-900/20 p-4"
role="status"
>
<svg
class="mt-0.5 h-5 w-5 shrink-0 text-amber-400"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
stroke-width="2"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M12 18h.01M8.111 15.111a5.5 5.5 0 017.778 0M4.929 11.929a10 10 0 0114.142 0M12 21h.01"
/>
</svg>
<div>
<p class="font-medium text-amber-200">Waiting for WiFi</p>
<p class="mt-1 text-sm text-amber-200/80">
Downloads are paused because “WiFi Only” is enabled and this device is
on a metered or cellular connection. They'll resume automatically on
an unmetered network.
Downloads are paused because “WiFi Only” is enabled and this device is on a metered or
cellular connection. They'll resume automatically on an unmetered network.
</p>
</div>
</div>
@@ -161,7 +177,13 @@
<div class="text-center py-12 text-gray-400"><p>Loading transfers…</p></div>
{:else if transfers.length === 0}
<div class="rounded-lg border border-gray-700 bg-[var(--color-surface)] p-10 text-center">
<svg class="mx-auto mb-4 h-14 w-14 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="1.4">
<svg
class="mx-auto mb-4 h-14 w-14 text-gray-600"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
stroke-width="1.4"
>
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
</svg>
<p class="text-lg font-medium text-gray-300">Nothing downloading</p>