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:
@@ -52,6 +52,9 @@ export function PanelSurface({
|
||||
/**
|
||||
* What a locked dashboard looks like, beyond controls that read as disabled.
|
||||
*
|
||||
* Shared with the editor's view mode, which shows the same locked dashboard
|
||||
* from inside the app.
|
||||
*
|
||||
* Without it a read-only panel is a panel whose buttons do nothing, which
|
||||
* reads as broken rather than as locked. Frosted chrome over content, like
|
||||
* every other floating surface, and it says the state in words — a glyph on
|
||||
@@ -60,7 +63,7 @@ export function PanelSurface({
|
||||
* Live, because `locked` may be driven by a flow: the notice appears and goes
|
||||
* with the lock rather than with the page load.
|
||||
*/
|
||||
function LockNotice({ dashboard }: { dashboard: Dashboard }) {
|
||||
export function LockNotice({ dashboard }: { dashboard: Dashboard }) {
|
||||
const { Notice } = useUi()
|
||||
// Read straight from the document rather than through `useLocked`: that
|
||||
// provider sits inside the grid, and this notice is beside it.
|
||||
|
||||
Reference in New Issue
Block a user