ui : show favorites above download progress in model selector

Favorites sit above the in-flight downloads; the dropdown visual order
follows the new list order.

Assisted-by: pi:zai-org/GLM-5.3
This commit is contained in:
Aleksander Grygier
2026-09-03 13:26:09 +02:00
parent 1242a18185
commit fdc82b3c62
2 changed files with 10 additions and 10 deletions
@@ -88,8 +88,8 @@
let visualOrder = $derived.by(() => {
const order: string[] = [];
for (const item of ms.groupedFilteredOptions.loaded) order.push(item.option.id);
for (const item of ms.groupedFilteredOptions.favorites) order.push(item.option.id);
for (const item of ms.groupedFilteredOptions.loaded) order.push(item.option.id);
for (const group of ms.groupedFilteredOptions.available) {
for (const item of group.items) order.push(item.option.id);
}
@@ -48,8 +48,16 @@
/>
{/snippet}
{#if groups.favorites.length > 0}
<p class={sectionHeaderClass}>Favorite models</p>
{#each groups.favorites as item (`fav-${item.option.id}`)}
{@render render(item, true)}
{/each}
{/if}
{#if downloadEntries.length > 0}
<p class="{sectionHeaderClass} mt-0">Download in progress</p>
<p class={sectionHeaderClass}>Download in progress</p>
{#each downloadEntries as entry (entry.repoWithTag)}
<ModelsSelectorDownloadItem {entry} />
@@ -64,14 +72,6 @@
{/each}
{/if}
{#if groups.favorites.length > 0}
<p class={sectionHeaderClass}>Favorite models</p>
{#each groups.favorites as item (`fav-${item.option.id}`)}
{@render render(item, true)}
{/each}
{/if}
{#if groups.available.length > 0}
<h2 class={sectionHeaderClass}>Downloaded models</h2>