Say a dashboard is read-only in the editor's view mode too
The lock notice was on `PanelSurface` alone, so /dashboards/{name} showed
disabled controls with nothing naming the state. Same pill, not a second
one; edit mode keeps its controls live, so it stays out of there.
This commit is contained in:
@@ -67,6 +67,7 @@ import {
|
||||
widgetsOf,
|
||||
} from "./DashboardView"
|
||||
import { PanelRail } from "./PanelRail"
|
||||
import { LockNotice } from "./PanelSurface"
|
||||
import { DashboardPanel, WidgetPanel } from "./panels"
|
||||
import {
|
||||
dashboardKeys,
|
||||
@@ -545,6 +546,11 @@ export function DashboardEditor({
|
||||
</span>
|
||||
</CanvasTitle>
|
||||
|
||||
{/* Reading this dashboard is reading the panel, disabled controls and
|
||||
all — so it says the same thing a panel does. Not while editing:
|
||||
arranging never mounts the lock, so the controls are live. */}
|
||||
{edit ? null : <LockNotice dashboard={draft} />}
|
||||
|
||||
<motion.div
|
||||
variants={slideUp}
|
||||
initial="hidden"
|
||||
|
||||
Reference in New Issue
Block a user