Sync shared snapshot from 7b5a4e6
This commit is contained in:
1 parent
695ff742d6
commit
68f6dd5a87
47 files changed
+587
-726
No files matched your search
@@ -1,13 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { notify } from '@gabriel20xx/web-ui'
|
||||
import { Badge, Button, Card, notify, SectionTitle } from '@gabriel20xx/web-ui'
|
||||
import { post } from '$lib/api'
|
||||
import SectionTitle from '$lib/components/SectionTitle.svelte'
|
||||
import Badge from '$lib/components/ui/badge.svelte'
|
||||
import Button from '$lib/components/ui/button.svelte'
|
||||
import Card from '$lib/components/ui/card.svelte'
|
||||
|
||||
type Json = Record<string, unknown>
|
||||
type StatusTone = 'neutral' | 'primary' | 'success' | 'warning' | 'danger'
|
||||
type StatusTone = 'default' | 'primary' | 'success' | 'warning' | 'danger'
|
||||
|
||||
let {
|
||||
status = {},
|
||||
@@ -74,7 +70,7 @@
|
||||
if (running) return paused ? 'warning' : 'primary'
|
||||
if (label.includes('error') || label.includes('failed')) return 'danger'
|
||||
if (['idle', 'completed', 'complete', 'done'].includes(label)) return 'success'
|
||||
return 'neutral'
|
||||
return 'default'
|
||||
}
|
||||
|
||||
const extractionProgress = $derived(asRecord(status.extractionProgress))
|
||||
@@ -155,7 +151,7 @@
|
||||
<div class="flex items-center justify-between gap-3">
|
||||
<span class="text-sm text-muted-fg">State</span>
|
||||
<div class="flex items-center gap-2">
|
||||
<Badge {tone}>{stateLabel}</Badge>
|
||||
<Badge variant={tone}>{stateLabel}</Badge>
|
||||
{#if canStop}
|
||||
<Button variant="danger" size="sm" disabled={stopping} onclick={() => void stopAction()}>
|
||||
{stopping ? 'Stopping…' : 'Stop'}
|
||||
|
||||
Reference in new issue
Block a user