Skip to content

Modern Docker Management, Designed for Everyone

fix: refresh environment on all pages

Kyle Mendell44501d492f88
diff --git a/frontend/src/routes/containers/+page.svelte b/frontend/src/routes/containers/+page.svelte
index 88dcf4356..6c2b2711e 100644
--- a/frontend/src/routes/containers/+page.svelte
+++ b/frontend/src/routes/containers/+page.svelte
@@ -71,10 +71,9 @@
});
}
- const selectedEnvStore = environmentStore.selected;
let lastEnvId: string | null = null;
$effect(() => {
- const env = selectedEnvStore as Environment | null;
+ const env = environmentStore.selected;
if (!env) return;
if (lastEnvId === null) {
lastEnvId = env.id;
diff --git a/frontend/src/routes/images/+page.svelte b/frontend/src/routes/images/+page.svelte
index e1eea28b3..98534f37a 100644
--- a/frontend/src/routes/images/+page.svelte
+++ b/frontend/src/routes/images/+page.svelte
@@ -88,10 +88,9 @@
});
}
- const selectedEnvStore = environmentStore.selected;
let lastEnvId: string | null = null;
$effect(() => {
- const env = selectedEnvStore as Environment | null;
+ const env = environmentStore.selected;
if (!env) return;
if (lastEnvId === null) {
lastEnvId = env.id;
diff --git a/frontend/src/routes/networks/+page.svelte b/frontend/src/routes/networks/+page.svelte
index 7e3d5ba4e..51153ec60 100644
--- a/frontend/src/routes/networks/+page.svelte
+++ b/frontend/src/routes/networks/+page.svelte
@@ -70,10 +70,9 @@
});
}
- const selectedEnvStore = environmentStore.selected;
let lastEnvId: string | null = null;
$effect(() => {
- const env = selectedEnvStore as Environment | null;
+ const env = environmentStore.selected;
if (!env) return;
if (lastEnvId === null) {
lastEnvId = env.id;
diff --git a/frontend/src/routes/projects/+page.svelte b/frontend/src/routes/projects/+page.svelte
index 03830a125..f31195c26 100644
--- a/frontend/src/routes/projects/+page.svelte
+++ b/frontend/src/routes/projects/+page.svelte
@@ -69,10 +69,9 @@
});
}
- const selectedEnvStore = environmentStore.selected;
let lastEnvId: string | null = null;
$effect(() => {
- const env = selectedEnvStore as Environment | null;
+ const env = environmentStore.selected;
if (!env) return;
if (lastEnvId === null) {
lastEnvId = env.id;
diff --git a/frontend/src/routes/volumes/+page.svelte b/frontend/src/routes/volumes/+page.svelte
index a7e06e857..e123d7a5f 100644
--- a/frontend/src/routes/volumes/+page.svelte
+++ b/frontend/src/routes/volumes/+page.svelte
@@ -11,7 +11,6 @@
import { m } from '$lib/paraglide/messages';
import { volumeService } from '$lib/services/volume-service';
import { environmentStore } from '$lib/stores/environment.store.svelte';
- import type { Environment } from '$lib/types/environment.type';
import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index.js';
let { data } = $props();
@@ -74,10 +73,9 @@
});
}
- const selectedEnvStore = environmentStore.selected;
let lastEnvId: string | null = null;
$effect(() => {
- const env = selectedEnvStore as Environment | null;
+ const env = environmentStore.selected;
if (!env) return;
if (lastEnvId === null) {
lastEnvId = env.id;