Sync shared snapshot from 7b5a4e6

This commit is contained in:
Gabriel20xx committed 2026-09-03 00:16:55 +02:00
1 parent 695ff742d6
commit 68f6dd5a87
47 files changed
+587 -726

No files matched your search

@@ -14,17 +14,12 @@
Trash2,
} from '@lucide/svelte'
import { onDestroy, onMount } from 'svelte'
import { notify } from '@gabriel20xx/web-ui'
import { Badge, Button, Card, EmptyState, notify, SectionTitle } from '@gabriel20xx/web-ui'
import { get, post } from '$lib/api'
import SectionTitle from '$lib/components/SectionTitle.svelte'
import { pageActions } from '$lib/stores/page-actions.svelte'
import Card from '$lib/components/ui/card.svelte'
import Button from '$lib/components/ui/button.svelte'
import Badge from '$lib/components/ui/badge.svelte'
import EmptyState from '$lib/components/EmptyState.svelte'
type Json = Record<string, unknown>
type StatusTone = 'neutral' | 'primary' | 'success' | 'warning' | 'danger'
type StatusTone = 'default' | 'primary' | 'success' | 'warning' | 'danger'
type ConnectionStatus = { label: string; tone: StatusTone; title?: string }
type MountEntry = { type: string; path: string }
type TransferLimit = { uploadKbps: string; downloadKbps: string }
@@ -584,7 +579,7 @@
}
function statusFor(key: string): ConnectionStatus {
return statuses[key] || { label: 'Unknown', tone: 'neutral' }
return statuses[key] || { label: 'Unknown', tone: 'default' }
}
async function checkTarget(key: string, rawUrl: string, project: string | null, id: string) {
@@ -593,7 +588,7 @@
urls = { ...urls, [id]: url }
}
if (!url) {
statuses = { ...statuses, [key]: { label: 'No URL', tone: 'neutral' } }
statuses = { ...statuses, [key]: { label: 'No URL', tone: 'default' } }
return
}
@@ -845,7 +840,7 @@
<p class="mt-1 text-xs text-muted-fg">The image-generation service used by MediaTools.</p>
</div>
<div class="flex items-center gap-2">
<Badge tone={statusFor('comfyui').tone} title={statusFor('comfyui').title}
<Badge variant={statusFor('comfyui').tone} title={statusFor('comfyui').title}
>{statusFor('comfyui').label}</Badge
>
<Button variant="secondary" size="sm" onclick={() => void checkConnection('comfyui')}>Check</Button>
@@ -883,7 +878,7 @@
{connection.label || `External Connection ${index + 1}`}
</p>
<Badge
tone={statusFor(`external:${connection.id}`).tone}
variant={statusFor(`external:${connection.id}`).tone}
title={statusFor(`external:${connection.id}`).title}
>
{statusFor(`external:${connection.id}`).label}
@@ -1007,13 +1002,13 @@
<div class="flex items-center gap-2">
<p class="text-sm font-semibold text-fg">{labels.mediaconfig || 'MediaConfig'}</p>
{#if labels.mediaconfig}<span class="text-xs text-muted-fg">(MediaConfig)</span>{/if}
<Badge tone={statusFor('mediaconfig').tone} title={statusFor('mediaconfig').title}
<Badge variant={statusFor('mediaconfig').tone} title={statusFor('mediaconfig').title}
>{statusFor('mediaconfig').label}</Badge
>
</div>
<div class="flex items-center gap-2">
<Button variant="secondary" size="sm" onclick={() => void checkConnection('mediaconfig')}>Check</Button>
<Badge tone="primary"><Check class="size-3" />Self</Badge>
<Badge variant="primary"><Check class="size-3" />Self</Badge>
</div>
</div>
<div class="mt-4 grid gap-4 md:grid-cols-2">
@@ -1068,7 +1063,7 @@
{#if labels[projectKey(project)]}<span class="text-xs text-muted-fg"
>({getInstanceLabel(project)})</span
>{/if}
<Badge tone={statusFor(projectKey(project)).tone} title={statusFor(projectKey(project)).title}
<Badge variant={statusFor(projectKey(project)).tone} title={statusFor(projectKey(project)).title}
>{statusFor(projectKey(project)).label}</Badge
>
</div>
@@ -1167,7 +1162,7 @@
<div class="flex min-w-0 flex-wrap items-center gap-2">
<p class="truncate text-sm font-semibold text-fg">{labels[key] || getInstanceLabel(project)}</p>
{#if labels[key]}<span class="text-xs text-muted-fg">({getInstanceLabel(project)})</span>{/if}
<Badge tone={statusFor(key).tone} title={statusFor(key).title}>{statusFor(key).label}</Badge>
<Badge variant={statusFor(key).tone} title={statusFor(key).title}>{statusFor(key).label}</Badge>
</div>
</div>
<div class="flex shrink-0 items-center gap-1">