Merge branch 'dev'
This commit is contained in:
commit
63d8cb63fa
|
|
@ -198,35 +198,6 @@ export function renderShell(opts: ShellOptions): string {
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// ── Redirect logged-in users from demo to personal space ──
|
|
||||||
(function() {
|
|
||||||
var slug = '${escapeAttr(spaceSlug)}';
|
|
||||||
var modId = '${escapeAttr(moduleId)}';
|
|
||||||
if (slug !== 'demo') return;
|
|
||||||
if (sessionStorage.getItem('rspace_stay_demo')) return;
|
|
||||||
try {
|
|
||||||
var raw = localStorage.getItem('encryptid_session');
|
|
||||||
if (!raw) return;
|
|
||||||
var session = JSON.parse(raw);
|
|
||||||
var username = session && session.claims && session.claims.username;
|
|
||||||
if (!username) return;
|
|
||||||
username = username.toLowerCase();
|
|
||||||
var host = window.location.host.split(':')[0];
|
|
||||||
// Already on the user's personal subdomain — skip
|
|
||||||
if (host === username + '.rspace.online') return;
|
|
||||||
var target = window.location.protocol + '//' + username + '.rspace.online/' + modId;
|
|
||||||
window.location.replace(target);
|
|
||||||
} catch(e) {}
|
|
||||||
})();
|
|
||||||
|
|
||||||
// ── "Try Demo" dismiss: set sessionStorage flag so redirect doesn't fire ──
|
|
||||||
(function() {
|
|
||||||
var btn = document.querySelector('.rstack-header__demo-btn');
|
|
||||||
if (btn) btn.addEventListener('click', function() {
|
|
||||||
try { sessionStorage.setItem('rspace_stay_demo', '1'); } catch(e) {}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
// ── Tab bar / Layer system initialization ──
|
// ── Tab bar / Layer system initialization ──
|
||||||
// Tabs persist in localStorage so they survive full-page navigations.
|
// Tabs persist in localStorage so they survive full-page navigations.
|
||||||
// When a user opens a new rApp (via the app switcher or tab-add),
|
// When a user opens a new rApp (via the app switcher or tab-add),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue