Add force refresh support and state management improvements to plugin installer and model config

- Add force parameter to plugin index fetch with cache-busting headers and timestamp
- Add openIndexView and reloadIndex methods to pluginInstallStore for explicit refresh
- Add request sequence tracking to prevent race conditions in concurrent index loads
- Move models summary state from component to store with loading/caching support
- Add refreshModelsSummary, ensureModelsSummaryLoaded, and modal
This commit is contained in:
frdel 2026-03-26 17:24:32 +01:00
parent 87ad4dab86
commit c7a983638e
6 changed files with 185 additions and 64 deletions

View file

@ -8,7 +8,7 @@
<body>
<div x-data>
<template x-if="$store.pluginInstallStore">
<div class="pi-browse-shell">
<div class="pi-browse-shell" x-create="$store.pluginInstallStore.openIndexView()">
<section class="pi-browse-hero">
<div class="pi-browse-copy">
@ -39,6 +39,15 @@
<option value="name">Name</option>
</select>
</label>
<button type="button"
class="button icon-button pi-reload-button"
aria-label="Reload Plugin Hub"
title="Reload Plugin Hub"
@click="$store.pluginInstallStore.reloadIndex()"
:disabled="$store.pluginInstallStore.loading">
<span class="material-symbols-outlined">refresh</span>
</button>
</div>
<div class="pi-filter-row" x-show="$store.pluginInstallStore.browseFilters.length > 1">
@ -268,6 +277,20 @@
justify-content: space-between;
}
.pi-reload-button {
flex-shrink: 0;
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 0;
min-height: 0;
padding: 0.45rem 0.6rem;
}
.pi-reload-button .material-symbols-outlined {
font-size: 1.1rem;
}
.pi-field-label {
font-size: 0.8rem;
font-weight: 600;