one gallery editor, in both places

GalleriesPanel drew its own copy of the item list — same operations, same routes,
arrows instead of a grip. It is a master list now: which galleries there are,
making one, deleting one. What is inside the selected one is announced to the
editor column and drawn by GalleryItems, which is what a gallery BLOCK already
used.

The device toggle only shows where there is a page to look at. It sets the width
the preview renders at, and Galleries, Media and Administration have none.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-01 20:44:52 +01:00
co-authored by Claude Opus 5
parent 54141726d6
commit 459793a33c
2 changed files with 73 additions and 140 deletions
+15 -4
View File
@@ -59,10 +59,21 @@ export const EditorPanel = () => {
</div>
)}
{/* Outside the scroll area, so a long editor cannot carry it off the screen. */}
<div className="shrink-0 border-b border-border px-3 py-2">
<DeviceToggle />
</div>
{/*
Only where there is a page to look at.
The toggle sets the width the PREVIEW renders at, and Galleries, Media and Administration have
no preview — the control would be three buttons that do nothing visible. Named here rather
than read from `usePreviewable`, which is a context inside the detail panel and this is its
sibling.
Outside the scroll area, so a long editor cannot carry it off the screen.
*/}
{(section === 'layout' || section === 'pages') && (
<div className="shrink-0 border-b border-border px-3 py-2">
<DeviceToggle />
</div>
)}
{editor ? (
/*