✨ feat: enhance admin UI configuration and SSR handling
- Add support for number chip arrays and JSON editor in admin UI config. - Introduce pagebuilder block registry for Svelte components in admin previews. - Implement custom role names and a 3-layer cascade model for field-level permissions. - Add CORS configuration hierarchy for better API security. - Update project setup instructions for admin token and config management. - Improve SSR 404 signaling with proper context handling in NotFound component. - Refactor routing structure to separate NotFound page into its own route.
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ Svelte 5 SPA bundled with esbuild and styled with Tailwind CSS 4.
|
||||
- `src/lib/` — utilities, stores, actions, API layer.
|
||||
- `src/widgets/` — reusable UI components (Button, Input, Form, etc.).
|
||||
- `src/css/` — global styles and Tailwind imports.
|
||||
- Keep route components in a `src/routes/` folder when needed.
|
||||
- `src/routes/` — page-level components (e.g. `NotFound.svelte` for the 404 page). Not file-based routing — these are manually imported by `App.svelte`.
|
||||
|
||||
## Routing
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import ToastContainer from "./widgets/ToastContainer.svelte"
|
||||
import DebugFooterInfo from "./widgets/DebugFooterInfo.svelte"
|
||||
import BlockRenderer from "./blocks/BlockRenderer.svelte"
|
||||
import NotFound from "./blocks/NotFound.svelte"
|
||||
import NotFound from "./routes/NotFound.svelte"
|
||||
import { initScrollRestoration } from "./lib/navigation"
|
||||
import { getCachedEntries } from "./lib/api"
|
||||
import {
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
import { _ } from "../lib/i18n/index"
|
||||
import { localizedPath } from "../lib/i18n"
|
||||
import { reveal } from "../lib/actions/reveal"
|
||||
|
||||
// Signal HTTP 404 to the SSR hook during server-side rendering.
|
||||
// get_read.js checks context.is404 after render() and returns status 404.
|
||||
if (typeof window === "undefined") {
|
||||
// @ts-ignore - context is the goja global in SSR runtime (declared by tibi-types)
|
||||
context.is404 = true
|
||||
}
|
||||
</script>
|
||||
|
||||
<section class="min-h-[60vh] flex items-center justify-center bg-gray-50">
|
||||
Reference in New Issue
Block a user