Trim comments to the non-obvious why
Drop narration, history and restated-code comments across the repo, keep short ones for security boundaries, upstream quirks and ordering constraints, and record the convention in CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -1,15 +1,7 @@
|
||||
<script setup>
|
||||
/**
|
||||
* The router's catch-all: any path no other route claims is looked up as an
|
||||
* admin-created canvas page (the `Page` GraphQL type) and, if there is one,
|
||||
* rendered as a BoxCanvas whose page key is the slug. Otherwise it is the
|
||||
* site's 404 — with, for an admin, a form to create a page right here.
|
||||
*
|
||||
* Static routes always win, which is why the server refuses slugs under the
|
||||
* SPA's and Caddy's own paths (validateSlug in backend/graph/page_helpers.go).
|
||||
*
|
||||
* An adminOnly page answers null to anyone else, so to them it is simply a
|
||||
* 404.
|
||||
* The catch-all route: a canvas page for the slug, else the 404 (with a create
|
||||
* form for admins). Hidden pages read as 404 to everyone else.
|
||||
*/
|
||||
import { computed, ref, watch } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
||||
Reference in New Issue
Block a user