From c4391bb5839c006e91d54ae8329f5e4eaf4e969c Mon Sep 17 00:00:00 2001 From: GJS Date: Thu, 2 Jan 2025 14:08:13 +0100 Subject: [PATCH] Updated: Adjust monitor deletion flow and page reload behavior - Changed the page redirect after monitor deletion to the home page ("/") for a proper UI refresh. - Removed the temporary route ("/temp") to simplify the deletion process. - Ensured that the UI reloads correctly after monitor deletions via a direct redirect to the home page. modified: src/components/MonitorList.vue --- src/components/MonitorList.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/MonitorList.vue b/src/components/MonitorList.vue index 69c95205c..454c288d0 100644 --- a/src/components/MonitorList.vue +++ b/src/components/MonitorList.vue @@ -354,11 +354,9 @@ export default { // Remove the monitor from the selectedMonitors list upon successful deletion delete this.selectedMonitors[id]; - // Use Vue Router to navigate to a temporary route before redirecting to /dashboard - // This reloads the page to reflect changes after deletion - this.$router.push("/temp").then(() => { - this.$router.push("/dashboard"); - }); + // Navigate to the home page ("/") to trigger a page reload and reflect the updates + // This step is necessary to refresh the UI after the monitors have been deleted + this.$router.push("/"); // Store a flag in localStorage to trigger a toast notification on page reload // This ensures the notification displays after the page refreshes