diff --git a/ui_server.py b/ui_server.py index ceedae4..6bed1b7 100644 --- a/ui_server.py +++ b/ui_server.py @@ -1304,6 +1304,7 @@ HTML = """ .config-canvas > .config-block.is-dragging, .config-canvas > .config-block.is-resizing { z-index: 5; border-color: var(--ui-accent) !important; box-shadow: 0 10px 28px color-mix(in srgb, var(--ui-accent) 16%, transparent); transition: none; } .config-canvas > .config-custom-block { border-style: dashed !important; } .config-block > summary { position: sticky; top: 0; z-index: 2; background: var(--ui-panel); } + .config-block > summary::after { content: '⠿' !important; color: var(--ui-accent); font-size: 16px; line-height: 1; transform: none !important; } .block-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .config-block > summary { cursor: grab; touch-action: none; } .config-block > summary:active, .config-block.is-dragging > summary { cursor: grabbing; } @@ -1874,6 +1875,10 @@ HTML = """ if (saved && typeof saved === 'object') state = saved; } catch (_error) {} document.querySelectorAll('details[data-section]').forEach(section => { + if (section.closest('#controlForm')) { + section.open = true; + return; + } const key = section.dataset.section; const summary = section.querySelector('summary'); if (state[key] === false) section.open = false; @@ -2166,12 +2171,14 @@ HTML = """ titleNode.textContent = title; summary.appendChild(titleNode); summary.setAttribute('aria-label', `${title}. Перетаскивайте заголовок для перемещения`); + summary.setAttribute('aria-expanded', 'true'); summary.addEventListener('click', event => { + event.preventDefault(); if (block._suppressSummaryClick) { - event.preventDefault(); event.stopPropagation(); block._suppressSummaryClick = false; } + block.open = true; }); block.addEventListener('pointerdown', event => { bringConfigBlockFront(block); @@ -2265,7 +2272,11 @@ HTML = """ summary.addEventListener('pointerup', end, {once: true}); summary.addEventListener('pointercancel', end, {once: true}); }); - block.addEventListener('toggle', updateConfigCanvasHeight); + block.addEventListener('toggle', () => { + if (!block.open) block.open = true; + summary.setAttribute('aria-expanded', 'true'); + updateConfigCanvasHeight(); + }); } function resetConfigLayout() { const custom = {};