24 lines
768 B
TypeScript
24 lines
768 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";
|
|
|
|
// Register all header components
|
|
RStackIdentity.define();
|
|
RStackAppSwitcher.define();
|
|
RStackSpaceSwitcher.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?.();
|
|
});
|