mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
perf(console): preserve one instance across admin navigation
Use a fixed page key instead of remounting the whole console for each URL. Refresh each view when shown and isolate overview metrics and logs so page filters cannot leak into the dashboard.
This commit is contained in:
1 parent
462f1db833
commit
de84155e09
3 files changed
+31
-11
No files matched your search
@@ -2,6 +2,9 @@
|
||||
import { parseAdminPath } from "~/utils/admin-path";
|
||||
|
||||
definePageMeta({
|
||||
// One console for every /admin path: switching pages keeps its state (and
|
||||
// its in-flight saves) instead of mounting a fresh copy per URL.
|
||||
key: "admin-console",
|
||||
// Unknown console paths (e.g. /admin/foo, /admin/groups/a/b) 404 before rendering.
|
||||
validate: (route) => parseAdminPath(route.params.slug) !== null,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user