feat: handle SSE cache invalidation and nightly rust toolchain config

Adds a Vue watch in `ServerDrawer.vue` to trigger a manual container directory refresh when SSE cache invalidation clears `browseData`. Includes guards to prevent redundant requests during active loads and properly manages the `isLoading` state. Additionally, introduces `rust-toolchain.toml` to enforce the nightly Rust compiler across all environments, ensuring consistent builds and access to recent language improvements.
This commit is contained in:
2026-06-07 14:03:06 +02:00
parent 9b5a028f3f
commit 2b3fae7778
3 changed files with 17 additions and 1 deletions

View File

@@ -113,6 +113,20 @@ watch(drawerContentRef, (el) => {
if (el) setupObserver();
});
// Recharger quand le cache est invalidé par un événement SSE (containers_updated / global_updated)
watch(browseData, async (data, oldData) => {
if (!data && oldData && currentServer.value && currentContainerId.value && !isLoading.value) {
isLoading.value = true;
try {
await browseContainer(currentServer.value.id, currentContainerId.value, false);
} catch (error) {
console.error("[ServerDrawer] Erreur reload après invalidation cache:", error);
} finally {
isLoading.value = false;
}
}
});
// État du menu dropdown (pour chaque item, on stocke si son menu est ouvert)
const openMenuId = ref<string | null>(null);