web/queue: replace pipelineResults array with object

This commit is contained in:
jj
2025-05-23 17:44:47 +00:00
parent 17bcfa3a03
commit 892c055d6a
7 changed files with 38 additions and 28 deletions

View File

@@ -1,14 +1,14 @@
<script lang="ts">
import Skeleton from "$components/misc/Skeleton.svelte";
import type { UUID } from "$lib/types/queue";
import type { CobaltQueueItemRunning, UUID } from "$lib/types/queue";
type Props = {
percentage?: number;
workerId: UUID;
completedWorkers: Set<string>;
pipelineResults: CobaltQueueItemRunning['pipelineResults'];
}
let { percentage = 0, workerId, completedWorkers }: Props = $props();
let { percentage = 0, workerId, pipelineResults }: Props = $props();
</script>
<div class="file-progress">
@@ -17,7 +17,7 @@
class="progress"
style="width: {Math.min(100, percentage)}%"
></div>
{:else if completedWorkers.has(workerId)}
{:else if pipelineResults[workerId]}
<div
class="progress"
style="width: 100%"