Make the box canvas reusable: canvas pages, admin-only boxes, landing notes
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]>
This commit is contained in:
@@ -25,6 +25,7 @@ type CreateBookmarkInput struct {
|
||||
}
|
||||
|
||||
type CreateBoxInput struct {
|
||||
Page string `json:"page"`
|
||||
Kind string `json:"kind"`
|
||||
Widget *string `json:"widget,omitempty"`
|
||||
HTML *string `json:"html,omitempty"`
|
||||
@@ -36,6 +37,7 @@ type CreateBoxInput struct {
|
||||
Z *int `json:"z,omitempty"`
|
||||
Framed *bool `json:"framed,omitempty"`
|
||||
HideOnMobile *bool `json:"hideOnMobile,omitempty"`
|
||||
AdminOnly *bool `json:"adminOnly,omitempty"`
|
||||
}
|
||||
|
||||
type CreateFavoriteInput struct {
|
||||
@@ -44,6 +46,12 @@ type CreateFavoriteInput struct {
|
||||
Link *string `json:"link,omitempty"`
|
||||
}
|
||||
|
||||
type CreatePageInput struct {
|
||||
Slug string `json:"slug"`
|
||||
Title string `json:"title"`
|
||||
AdminOnly *bool `json:"adminOnly,omitempty"`
|
||||
}
|
||||
|
||||
type CreatePlaceInput struct {
|
||||
Title string `json:"title"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
@@ -138,6 +146,13 @@ type UpdateBoxInput struct {
|
||||
Z *int `json:"z,omitempty"`
|
||||
Framed *bool `json:"framed,omitempty"`
|
||||
HideOnMobile *bool `json:"hideOnMobile,omitempty"`
|
||||
AdminOnly *bool `json:"adminOnly,omitempty"`
|
||||
}
|
||||
|
||||
type UpdatePageInput struct {
|
||||
Slug *string `json:"slug,omitempty"`
|
||||
Title *string `json:"title,omitempty"`
|
||||
AdminOnly *bool `json:"adminOnly,omitempty"`
|
||||
}
|
||||
|
||||
type UpdatePlaceInput struct {
|
||||
|
||||
Reference in New Issue
Block a user