mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-20 17:13:49 +00:00
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.
16 lines
474 B
Vue
16 lines
474 B
Vue
<script setup lang="ts">
|
|
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,
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<ConsolePage />
|
|
</template>
|