Improve property description hints for dialogs

This commit is contained in:
2026-02-12 00:31:44 +03:00
parent ebec1bd16e
commit d229c9a0d5
5 changed files with 136 additions and 26 deletions

View File

@@ -2,6 +2,16 @@ const API_BASE = '/api/v1';
let refreshInterval = null;
let apiKey = null;
// Toggle hint description visibility next to a label
function toggleHint(btn) {
const hint = btn.closest('.label-row').nextElementSibling;
if (hint && hint.classList.contains('input-hint')) {
const visible = hint.style.display !== 'none';
hint.style.display = visible ? 'none' : 'block';
btn.classList.toggle('active', !visible);
}
}
// Backdrop click helper: only closes modal if both mousedown and mouseup were on the backdrop itself.
// Prevents accidental close when user drags text selection outside the dialog.
function setupBackdropClose(modal, closeFn) {