diff --git a/public/assets/pages-screen.js b/public/assets/pages-screen.js
index de71e05..30221a4 100644
--- a/public/assets/pages-screen.js
+++ b/public/assets/pages-screen.js
@@ -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: '' });
- 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);
diff --git a/public/pages.html b/public/pages.html
index 8f1d57b..d24c2c6 100644
--- a/public/pages.html
+++ b/public/pages.html
@@ -70,6 +70,6 @@
-
+