Pages domain: member pages publish at the root of site.pagesDomain (lookfirst.page), /p/<slug> kept everywhere; the pages host serves nothing else (/ -> app, unknown paths 404); Pages screen shows the new URLs

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-08 17:40:05 -05:00
parent 92c5b777da
commit c515a01441
3 changed files with 20 additions and 9 deletions
+3 -3
View File
@@ -1,13 +1,13 @@
// LinkSpin Pages screen: gallery + wizard (scan -> type -> angle -> write) + editor + leads.
(function () {
const $ = id => document.getElementById(id); const esc = CR.esc, fmt = CR.fmt, api = CR.api, toast = CR.toast, dialog = CR.dialog;
let PAGES = [], SEL = null, SCAN = null, TYPE = 'bridge', HOSTS = [];
let PAGES = [], SEL = null, SCAN = null, TYPE = 'bridge', HOSTS = [], BASE = '';
let STYLES = { palettes: [], designs: [], layouts: [], niches: [] };
CR.mount({ active: 'pages', title: 'Pages', sub: 'loading', actions: '<button class="btn pri" type="button" id="newBtn">+ New page</button>' });
const pageUrl = p => 'https://' + (HOSTS[0] || location.host) + '/p/' + p.slug;
const pageUrl = p => (BASE || ('https://' + (HOSTS[0] || location.host) + '/p/')) + p.slug;
async function load(keepSel) {
let r; try { r = await CR.get('/api/my/pages'); } catch (e) { CR.sub('could not load'); return; }
PAGES = r.pages || []; HOSTS = r.hosts || []; if (r.styles) STYLES = r.styles;
PAGES = r.pages || []; HOSTS = r.hosts || []; BASE = r.pageBase || ''; if (r.styles) STYLES = r.styles;
const pubd = PAGES.filter(p => p.status === 'published').length;
CR.sub(PAGES.length + ' page' + (PAGES.length === 1 ? '' : 's') + ' · ' + pubd + ' live');
const views = PAGES.reduce((n, p) => n + p.views, 0), leads = PAGES.reduce((n, p) => n + p.leads, 0), clicks = PAGES.reduce((n, p) => n + p.clicks, 0);
+1 -1
View File
@@ -70,6 +70,6 @@
</div>
</div>
<script src="/assets/cr-shell.js?v=20261008c"></script>
<script src="/assets/pages-screen.js?v=20261008a"></script>
<script src="/assets/pages-screen.js?v=20261008b"></script>
</body>
</html>