From 5efdc8877bdbfe4fe9f86cb04951a3ff3011adea Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Fri, 4 Sep 2026 17:46:16 +0200 Subject: [PATCH] ui : hoist the duplicated sidecar badge classes in the quant chip The sidecar kind badge repeated the same class string in the chip's idle, in-flight and downloaded branches; pull it into one constant. Assisted-by: llama-ui:Qwen3.8-Flash-Next --- ...ilsDownloadOptionsQuantDownloadButton.svelte | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tools/ui/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsQuantDownloadButton.svelte b/tools/ui/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsQuantDownloadButton.svelte index 1b376489f3..b564af7d67 100644 --- a/tools/ui/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsQuantDownloadButton.svelte +++ b/tools/ui/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsQuantDownloadButton.svelte @@ -23,6 +23,11 @@ let { entry, file, onRequestCancel, onRequestDelete }: Props = $props(); + // Sidecar kind (mtp, mmproj, ...) tag shown on every chip state; one source so + // the idle, in-flight and downloaded variants stay identical. + const SIDECAR_BADGE_CLASS = + 'rounded-md bg-primary px-1 py-0.5 text-[10px] font-semibold tracking-wide text-primary-foreground uppercase'; + /** Queue the download; a failed attempt leaves partial files, drop them first. */ async function startDownload() { try { @@ -68,9 +73,7 @@ type="button" > {#if meta?.sidecar} - + {meta.sidecar} {/if} @@ -122,9 +125,7 @@ type="button" > {#if meta?.sidecar} - + {meta.sidecar} {/if} @@ -219,9 +220,7 @@ {/if} {#if meta?.sidecar} - + {meta.sidecar} {/if}