SceneDashboard: Move time controls from nav toolbar into controls and make controls them sticky, and edit mode (#71082)

* Scene with sticky controls

* Progress on an edit mode
This commit is contained in:
Torkel Ödegaard
2023-07-06 11:21:03 +02:00
committed by GitHub
parent 1b80df0168
commit d87c2c4049
4 changed files with 174 additions and 73 deletions

View File

@@ -196,6 +196,17 @@ export const DashNav = React.memo<Props>((props) => {
);
}
if (config.featureToggles.scenes) {
buttons.push(
<DashNavButton
key="button-scenes"
tooltip={'View as Scene'}
icon="apps"
onClick={() => locationService.push(`/scenes/dashboard/${dashboard.uid}`)}
/>
);
}
addCustomContent(customLeftActions, buttons);
return buttons;
};
@@ -310,16 +321,6 @@ export const DashNav = React.memo<Props>((props) => {
buttons.push(renderTimeControls());
if (config.featureToggles.scenes) {
buttons.push(
<ToolbarButton
key="button-scenes"
tooltip={'View as Scene'}
icon="apps"
onClick={() => locationService.push(`/scenes/dashboard/${dashboard.uid}`)}
/>
);
}
return buttons;
};