Files
stpweb/vue/src/views/home3/Home3.vue
T
adamfandClaude Opus 5.5 2eacbc2e33
Test and deploy / test (push) Successful in 1m51s
Test and deploy / deploy (push) Successful in 1m10s
Add saved layouts, and make /stp an ordinary canvas page
A layout is a named copy of one canvas page's boxes and background
(models.Layout, layout.graphql), saved from the canvas's new Layouts
button and loaded onto any page from there or from the admin Pages
tab. Loading onto a page with boxes asks whether to replace them or
add on top; a replace first saves the page as a "<page> before
<layout>" layout so it can be undone. Copies, not links: editing a
page never changes a layout or another page. The copying is
server-side in one transaction, and everything is @admin since a
layout keeps admin-only boxes.

/stp loses its static route and becomes a Page with slug "stp",
created once at start-up (ensureStpPage), so it can be renamed,
hidden or deleted like a shrine. Its boxes were already keyed "stp".
Home3.vue is kept as legacy; its starter is now "Old /stp grid" in
pageStarters.js. ConfirmDialog gains an optional second button.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 20:33:07 +01:00

32 lines
989 B
Vue

<script setup>
/**
* STATUS: legacy — no route points here. `/stp` is now an ordinary canvas
* Page (slug "stp", created by ensureStpPage in backend/services/database.go)
* served by views/canvas/CanvasPage.vue; the "Old /stp grid" starter in
* views/canvas/pageStarters.js replaces this view's import button. Kept for
* reference.
*
* Was route `/stp` — the home page as a free-form canvas of boxes the admin
* arranges in the browser (page key "stp"). Replaces views/home/Home.vue's
* fixed grid. The canvas itself is BoxCanvas.vue, shared with the landing
* page's notes and the admin-created pages.
*/
import BoxCanvas from "./BoxCanvas.vue";
import { defaultLayout } from "./defaultLayout";
</script>
<template>
<main class="home3">
<BoxCanvas page="stp" :starter="defaultLayout" starter-label="Import current layout" />
</main>
</template>
<style scoped>
.home3 {
width: 100%;
min-height: 100%;
box-sizing: border-box;
padding: 10px 16px;
}
</style>