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:
2026-08-25 22:15:09 +02:00
parent 1511d71dcd
commit c5c1d0c93e
2 changed files with 10 additions and 1 deletions
@@ -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"