The /stp canvas is now BoxCanvas.vue, keyed by a page. Boxes carry a
page ("stp", "index" for the landing page's notes overlay, or a Page
slug) and an adminOnly flag that the boxes resolver filters server-side.
A new Page type lets the admin create canvas pages in the browser,
served at /<slug> by the router's catch-all (CanvasPage.vue), starting
from a Blank, Shrine or Notes-board layout. Slugs that an SPA or nginx
route would answer first are refused. Renaming a page moves its boxes;
deleting it deletes them.
The GTO, Evangelion and Skipskipbenben placeholder routes are dropped
in favour of canvas pages listed on /shrines, which the landing page
now links to. The box editor gains an admin-only toggle and an
upload-and-insert button, and there are Note, Heading, Text, Gallery
and Video templates.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
42 lines
1.0 KiB
GraphQL
42 lines
1.0 KiB
GraphQL
# Admin-created canvas pages. A page is just a slug and a title; its content
|
|
# is the boxes whose `page` is the slug (see box.graphql). The SPA serves it
|
|
# at /<slug> through its catch-all route, so a slug may not start with a path
|
|
# the site already uses — see validateSlug in page_helpers.go.
|
|
#
|
|
# adminOnly pages, and their boxes, are invisible to everyone but an admin:
|
|
# `page` answers null and `pages` leaves them out.
|
|
|
|
type Page {
|
|
id: ID!
|
|
createdAt: Time!
|
|
updatedAt: Time!
|
|
slug: String!
|
|
title: String!
|
|
adminOnly: Boolean!
|
|
}
|
|
|
|
input CreatePageInput {
|
|
slug: String!
|
|
title: String!
|
|
adminOnly: Boolean
|
|
}
|
|
|
|
input UpdatePageInput {
|
|
slug: String
|
|
title: String
|
|
adminOnly: Boolean
|
|
}
|
|
|
|
extend type Query {
|
|
pages: [Page!]!
|
|
page(slug: String!): Page
|
|
}
|
|
|
|
extend type Mutation {
|
|
createPage(input: CreatePageInput!): Page! @admin
|
|
# Renaming a page moves its boxes with it.
|
|
updatePage(id: ID!, input: UpdatePageInput!): Page! @admin
|
|
# Deletes the page's boxes too.
|
|
deletePage(id: ID!): Page! @admin
|
|
}
|