mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-18 10:28:05 +00:00
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
This commit is contained in:
parent
6a96694c17
commit
c4391bb583
1 changed files with 3 additions and 5 deletions
|
@ -354,11 +354,9 @@ export default {
|
||||||
// Remove the monitor from the selectedMonitors list upon successful deletion
|
// Remove the monitor from the selectedMonitors list upon successful deletion
|
||||||
delete this.selectedMonitors[id];
|
delete this.selectedMonitors[id];
|
||||||
|
|
||||||
// Use Vue Router to navigate to a temporary route before redirecting to /dashboard
|
// Navigate to the home page ("/") to trigger a page reload and reflect the updates
|
||||||
// This reloads the page to reflect changes after deletion
|
// This step is necessary to refresh the UI after the monitors have been deleted
|
||||||
this.$router.push("/temp").then(() => {
|
this.$router.push("/");
|
||||||
this.$router.push("/dashboard");
|
|
||||||
});
|
|
||||||
|
|
||||||
// Store a flag in localStorage to trigger a toast notification on page reload
|
// Store a flag in localStorage to trigger a toast notification on page reload
|
||||||
// This ensures the notification displays after the page refreshes
|
// This ensures the notification displays after the page refreshes
|
||||||
|
|
Loading…
Reference in a new issue