28 lines
937 B
TypeScript
28 lines
937 B
TypeScript
/**
|
|
* Shell entry point — loaded on every page.
|
|
*
|
|
* Registers the three header web components:
|
|
* <rstack-app-switcher>
|
|
* <rstack-space-switcher>
|
|
* <rstack-identity>
|
|
*/
|
|
|
|
import { RStackIdentity } from "../shared/components/rstack-identity";
|
|
import { RStackAppSwitcher } from "../shared/components/rstack-app-switcher";
|
|
import { RStackSpaceSwitcher } from "../shared/components/rstack-space-switcher";
|
|
import { RStackTabBar } from "../shared/components/rstack-tab-bar";
|
|
import { RStackMi } from "../shared/components/rstack-mi";
|
|
|
|
// Register all header components
|
|
RStackIdentity.define();
|
|
RStackAppSwitcher.define();
|
|
RStackSpaceSwitcher.define();
|
|
RStackTabBar.define();
|
|
RStackMi.define();
|
|
|
|
// Reload space list when user signs in/out (to show/hide private spaces)
|
|
document.addEventListener("auth-change", () => {
|
|
const spaceSwitcher = document.querySelector("rstack-space-switcher") as any;
|
|
spaceSwitcher?.reload?.();
|
|
});
|