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:
@@ -105,7 +105,7 @@ function end() {
|
||||
<template>
|
||||
<div
|
||||
class="box"
|
||||
:class="{ framed: box.framed, editing, selected }"
|
||||
:class="{ framed: box.framed, editing, selected, 'admin-only': box.adminOnly }"
|
||||
:style="style"
|
||||
>
|
||||
<slot />
|
||||
@@ -146,6 +146,12 @@ function end() {
|
||||
background-color: var(--color-surface);
|
||||
border: 2px solid var(--color-quaternary);
|
||||
}
|
||||
/* Only admins are ever sent an adminOnly box; the outline reminds them that
|
||||
nobody else can see it. */
|
||||
.box.admin-only:not(.editing) {
|
||||
outline: 2px dashed var(--color-tertiary);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: absolute;
|
||||
|
||||
Reference in New Issue
Block a user