feat(webui): in-place dashboard edit overlays + inline sidebar reorder
Rework the layout edit mode from a separate panel to in-place affordances: - Each dashboard widget gets a semi-transparent floating overlay in edit mode: a "拖动" grip bar (the whole card is the drag target — forgiving + discoverable), an eye to show/hide, and a gear that opens the per-widget settings in a dialog. Hidden widgets show as re-enableable "已隐藏" ghosts; the bottom-right resize grip is now clearly visible. - The sidebar nav becomes a drag-to-reorder list directly in the sidebar (show/hide + locked pinned items + a 完成 button); editing force-expands the sidebar (and disables the collapse toggle). Edit mode is a shared LayoutContext flag so one "编辑布局" toggle drives both the grid and the nav. - The separate editor panel (overview-layout-editor) is removed; the gear opens config in a dialog instead. Also: stat-tile typography tightened (leading-tight, smaller value, overflow clip) so text no longer hugs the edge on small/short tiles. Verified by an adversarial review round (no MUST-FIX).
This commit is contained in:
9 files changed
+339
-349
No files matched your search
@@ -238,12 +238,21 @@ html[data-reduce-motion="1"] *::after {
|
||||
background: color-mix(in oklab, var(--primary) 8%, transparent);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
/* Resize handle — only meaningful while editing (grid is interactive). */
|
||||
.grid-stack-item > .ui-resizable-handle {
|
||||
filter: none;
|
||||
}
|
||||
/* Resize handle — only present while editing (grid is interactive). Make the
|
||||
bottom-right grip obvious so it's clearly draggable. */
|
||||
.grid-stack-item > .ui-resizable-se {
|
||||
/* Make the bottom-right resize grip visible against either theme. */
|
||||
border-right: 2px solid color-mix(in oklab, var(--primary) 70%, transparent);
|
||||
border-bottom: 2px solid color-mix(in oklab, var(--primary) 70%, transparent);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
right: 5px;
|
||||
bottom: 5px;
|
||||
background-image: none;
|
||||
transform: none;
|
||||
border-right: 3px solid var(--primary);
|
||||
border-bottom: 3px solid var(--primary);
|
||||
border-bottom-right-radius: 5px;
|
||||
opacity: 0.65;
|
||||
z-index: 30;
|
||||
}
|
||||
.grid-stack-item:hover > .ui-resizable-se {
|
||||
opacity: 1;
|
||||
}
|
||||
Reference in new issue
Block a user