Files
martbost f562cc50be Rail shows Training, Pipeline, Profile; profile carry-over from InstantAdPay; hero frame + relative page images; the "how is this different from InstantAdPay" answer
- Control Room rail: Training, Pipeline and Profile are first-class entries (phone bar keeps them behind More)
- /api/partner/registry: rows may carry profile {avatarUrl, bio, socials}; fills only empty fields on this side, member edits win after that
- Pages: uploaded images are stored as /u/pages/... paths (any host, local recordings included); the split hero frame keeps a 3:2 shape with a tinted ground when an image fails to load (was a thin white bar)
- Home page section + chatbot canned answer + FACTS: InstantAdPay = marketplace, LinkSpin = tool side, same line and wallet
- asset tags bumped to 20261011a

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 06:41:25 -05:00

18 lines
1.4 KiB
JavaScript

// /tools glue: mounts the Control Room shell around the legacy panes and keeps the topbar + rail in step with the
// active pane (my.js owns the panes themselves; the hash is the source of truth).
(function () {
const TITLES = { overview: 'Start', promo: 'Promo tools', training: 'Training', pipeline: 'Pipeline', line: 'My line', profile: 'Profile' };
const pane = () => { const h = (location.hash || '').slice(1); return TITLES[h] ? h : 'overview'; };
const railKey = p => ({ promo: 'promo', training: 'training', pipeline: 'pipeline', profile: 'profile' })[p] || 'tools';
CR.mount({ active: railKey(pane()), title: TITLES[pane()], crumb: 'Control room', sub: '' });
function sync() {
const p = pane(); const h1 = document.querySelector('.topbar h1'); if (h1) h1.textContent = TITLES[p];
document.title = TITLES[p] + ' · LinkSpin';
const want = railKey(p) === 'tools' ? '/tools' : '/tools#' + p;
document.querySelectorAll('.rail a').forEach(a => { const href = a.getAttribute('href') || ''; if (href.startsWith('/tools')) a.classList.toggle('on', href === want); });
}
window.addEventListener('hashchange', sync); sync();
// the shell owns the session: sign-in dialog, who-button, status strip, login ad, first username. my.js waits for this.
CR.requireSession(() => { window.LS_SESSION_READY = true; window.dispatchEvent(new CustomEvent('ls:session')); });
})();