web/ProcessingQueue: indeterminate progress state

This commit is contained in:
wukko 2025-01-26 02:06:37 +06:00
parent af18bcd43f
commit 4f2c19b680
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -3,6 +3,7 @@
import { onNavigate } from "$app/navigation";
import type { SvelteComponent } from "svelte";
import { currentTasks } from "$lib/state/queen-bee/current-tasks";
import { clearQueue, queue as readableQueue } from "$lib/state/queen-bee/queue";
import SectionHeading from "$components/misc/SectionHeading.svelte";
@ -12,7 +13,6 @@
import ProcessingQueueStub from "$components/queue/ProcessingQueueStub.svelte";
import IconX from "@tabler/icons-svelte/IconX.svelte";
import { currentTasks } from "$lib/state/queen-bee/current-tasks";
let popover: SvelteComponent;
$: expanded = false;
@ -27,8 +27,7 @@
return 0;
}).reduce((a, b) => a + b) / (100 * queue.length) : 0;
// TODO: toggle this only when progress is unknown
$: indeterminate = false;
$: indeterminate = queue.length > 0 && totalProgress === 0;
const popoverAction = async () => {
expanded = !expanded;