fix: app-switcher dropdown navigates within demo on subdomains
On demo.rspace.online, the dropdown was linking to landing pages (rspace.online/moduleId) instead of navigating between demo pages. Changed condition to only use landing-page links on the bare domain. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
58af5a304c
commit
08928a9f8e
|
|
@ -187,11 +187,12 @@ export class RStackAppSwitcher extends HTMLElement {
|
|||
: `<span class="item-icon">${m.icon}</span>`;
|
||||
|
||||
const space = this.#getSpaceSlug();
|
||||
// On demo (bare domain, demo subdomain, or standalone r*.online): link to landing pages
|
||||
// On bare domain or standalone r*.online: link to landing pages.
|
||||
// On demo.rspace.online or user subdomains: use rspaceNavUrl for in-app navigation.
|
||||
const host = window.location.host.split(":")[0];
|
||||
const onRspace = host.includes("rspace.online");
|
||||
const isBareDomain = host === "rspace.online" || host === "www.rspace.online";
|
||||
const href =
|
||||
(onRspace && space === "demo") || isStandaloneDomain()
|
||||
(isBareDomain || isStandaloneDomain())
|
||||
? `${window.location.protocol}//rspace.online/${m.id}`
|
||||
: rspaceNavUrl(space, m.id);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue