|
|
|
@ -1304,6 +1304,7 @@ HTML = """<!doctype 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-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-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 { 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; }
|
|
|
|
.block-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
|
|
.config-block > summary { cursor: grab; touch-action: none; }
|
|
|
|
.config-block > summary { cursor: grab; touch-action: none; }
|
|
|
|
.config-block > summary:active, .config-block.is-dragging > summary { cursor: grabbing; }
|
|
|
|
.config-block > summary:active, .config-block.is-dragging > summary { cursor: grabbing; }
|
|
|
|
@ -1874,6 +1875,10 @@ HTML = """<!doctype html>
|
|
|
|
if (saved && typeof saved === 'object') state = saved;
|
|
|
|
if (saved && typeof saved === 'object') state = saved;
|
|
|
|
} catch (_error) {}
|
|
|
|
} catch (_error) {}
|
|
|
|
document.querySelectorAll('details[data-section]').forEach(section => {
|
|
|
|
document.querySelectorAll('details[data-section]').forEach(section => {
|
|
|
|
|
|
|
|
if (section.closest('#controlForm')) {
|
|
|
|
|
|
|
|
section.open = true;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
const key = section.dataset.section;
|
|
|
|
const key = section.dataset.section;
|
|
|
|
const summary = section.querySelector('summary');
|
|
|
|
const summary = section.querySelector('summary');
|
|
|
|
if (state[key] === false) section.open = false;
|
|
|
|
if (state[key] === false) section.open = false;
|
|
|
|
@ -2166,12 +2171,14 @@ HTML = """<!doctype html>
|
|
|
|
titleNode.textContent = title;
|
|
|
|
titleNode.textContent = title;
|
|
|
|
summary.appendChild(titleNode);
|
|
|
|
summary.appendChild(titleNode);
|
|
|
|
summary.setAttribute('aria-label', `${title}. Перетаскивайте заголовок для перемещения`);
|
|
|
|
summary.setAttribute('aria-label', `${title}. Перетаскивайте заголовок для перемещения`);
|
|
|
|
|
|
|
|
summary.setAttribute('aria-expanded', 'true');
|
|
|
|
summary.addEventListener('click', event => {
|
|
|
|
summary.addEventListener('click', event => {
|
|
|
|
if (block._suppressSummaryClick) {
|
|
|
|
|
|
|
|
event.preventDefault();
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
if (block._suppressSummaryClick) {
|
|
|
|
event.stopPropagation();
|
|
|
|
event.stopPropagation();
|
|
|
|
block._suppressSummaryClick = false;
|
|
|
|
block._suppressSummaryClick = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
block.open = true;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
block.addEventListener('pointerdown', event => {
|
|
|
|
block.addEventListener('pointerdown', event => {
|
|
|
|
bringConfigBlockFront(block);
|
|
|
|
bringConfigBlockFront(block);
|
|
|
|
@ -2265,7 +2272,11 @@ HTML = """<!doctype html>
|
|
|
|
summary.addEventListener('pointerup', end, {once: true});
|
|
|
|
summary.addEventListener('pointerup', end, {once: true});
|
|
|
|
summary.addEventListener('pointercancel', 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() {
|
|
|
|
function resetConfigLayout() {
|
|
|
|
const custom = {};
|
|
|
|
const custom = {};
|
|
|
|
|