mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-29 13:00:12 +02:00
web/ProcessingQueue: indeterminate progress state
This commit is contained in:
parent
af18bcd43f
commit
4f2c19b680
@ -3,6 +3,7 @@
|
|||||||
import { onNavigate } from "$app/navigation";
|
import { onNavigate } from "$app/navigation";
|
||||||
import type { SvelteComponent } from "svelte";
|
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 { clearQueue, queue as readableQueue } from "$lib/state/queen-bee/queue";
|
||||||
|
|
||||||
import SectionHeading from "$components/misc/SectionHeading.svelte";
|
import SectionHeading from "$components/misc/SectionHeading.svelte";
|
||||||
@ -12,7 +13,6 @@
|
|||||||
import ProcessingQueueStub from "$components/queue/ProcessingQueueStub.svelte";
|
import ProcessingQueueStub from "$components/queue/ProcessingQueueStub.svelte";
|
||||||
|
|
||||||
import IconX from "@tabler/icons-svelte/IconX.svelte";
|
import IconX from "@tabler/icons-svelte/IconX.svelte";
|
||||||
import { currentTasks } from "$lib/state/queen-bee/current-tasks";
|
|
||||||
|
|
||||||
let popover: SvelteComponent;
|
let popover: SvelteComponent;
|
||||||
$: expanded = false;
|
$: expanded = false;
|
||||||
@ -27,8 +27,7 @@
|
|||||||
return 0;
|
return 0;
|
||||||
}).reduce((a, b) => a + b) / (100 * queue.length) : 0;
|
}).reduce((a, b) => a + b) / (100 * queue.length) : 0;
|
||||||
|
|
||||||
// TODO: toggle this only when progress is unknown
|
$: indeterminate = queue.length > 0 && totalProgress === 0;
|
||||||
$: indeterminate = false;
|
|
||||||
|
|
||||||
const popoverAction = async () => {
|
const popoverAction = async () => {
|
||||||
expanded = !expanded;
|
expanded = !expanded;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user