feat(control-station): configure page-specific shell
This commit is contained in:
@@ -201,6 +201,17 @@ export default function App() {
|
||||
|
||||
const currentRoot = rootById(activeRoot);
|
||||
const visibleRoots = roots;
|
||||
const activeEnvironmentSurface = activeRoot ?? "home";
|
||||
const landingPage = environment.settings.pages[activeEnvironmentSurface];
|
||||
const landingQuickActions = [
|
||||
landingPage.primaryWorkspaceId,
|
||||
landingPage.secondaryWorkspaceId,
|
||||
].flatMap((workspaceId) => {
|
||||
const definition = workspaceById(workspaceId);
|
||||
if (!definition) return [];
|
||||
if (activeRoot !== null && definition.root !== activeRoot) return [];
|
||||
return [definition];
|
||||
});
|
||||
const activeDefinition = workspaceById(workspace.activeView);
|
||||
const sceneWorkspaceActive = Boolean(
|
||||
workspace.contentOpen
|
||||
@@ -634,7 +645,7 @@ export default function App() {
|
||||
value={activeRoot ?? undefined}
|
||||
items={visibleRoots.map((root) => ({
|
||||
value: root.id,
|
||||
label: environment.settings.headerLabels[root.id],
|
||||
label: environment.settings.pages[root.id].headerLabel,
|
||||
}))}
|
||||
onChange={selectRoot}
|
||||
/>
|
||||
@@ -684,11 +695,9 @@ export default function App() {
|
||||
backendStatus={runtime.backendStatus}
|
||||
phase={runtime.state?.phase}
|
||||
message={runtime.state?.message}
|
||||
background={
|
||||
environment.settings.backgrounds[activeRoot ?? "home"]
|
||||
}
|
||||
onOpenObservation={() => openView("spatial-scene")}
|
||||
onOpenDevice={() => openView("local-device")}
|
||||
page={landingPage}
|
||||
quickActions={landingQuickActions}
|
||||
onOpenWorkspace={openView}
|
||||
/>
|
||||
}
|
||||
navigation={currentRoot ? (
|
||||
|
||||
Reference in New Issue
Block a user