diff --git a/website/canvas.html b/website/canvas.html index 66cd329..0b5fcff 100644 --- a/website/canvas.html +++ b/website/canvas.html @@ -436,8 +436,18 @@ } } + - + +
+
+ + +
+
+ +
+

Loading...

@@ -535,10 +545,19 @@ generatePeerId, OfflineStore } from "@lib"; - import { mountHeader } from "@lib/rspace-header"; + import { RStackIdentity } from "@shared/components/rstack-identity"; + import { RStackAppSwitcher } from "@shared/components/rstack-app-switcher"; + import { RStackSpaceSwitcher } from "@shared/components/rstack-space-switcher"; - // Mount the header (light theme for canvas) - mountHeader({ theme: "light", showBrand: true }); + // Register shell header components + RStackIdentity.define(); + RStackAppSwitcher.define(); + RStackSpaceSwitcher.define(); + + // Load module list for app switcher + fetch("/api/modules").then(r => r.json()).then(data => { + document.querySelector("rstack-app-switcher")?.setModules(data.modules || []); + }).catch(() => {}); // Register service worker for offline support if ("serviceWorker" in navigator && window.location.hostname !== "localhost") { @@ -602,6 +621,13 @@ document.getElementById("community-name").textContent = communitySlug; document.getElementById("community-slug").textContent = `${communitySlug}.rspace.online`; + // Update shell header space-switcher with resolved slug + const spaceSwitcher = document.querySelector("rstack-space-switcher"); + if (spaceSwitcher) { + spaceSwitcher.setAttribute("current", communitySlug); + spaceSwitcher.setAttribute("name", communitySlug); + } + const canvas = document.getElementById("canvas"); const canvasContent = document.getElementById("canvas-content"); const status = document.getElementById("status"); diff --git a/website/index.html b/website/index.html index e11904c..9ca9d78 100644 --- a/website/index.html +++ b/website/index.html @@ -336,9 +336,19 @@ } } + - + +
+
+ + +
+
+ +
+

rSpace

@@ -567,10 +577,20 @@