version 1. Работают все функции на веб-панели, исправлено поведение при создании пользователей, теперь всё создаётся правильно

This commit is contained in:
2026-06-19 22:46:43 +03:00
parent 5469a967a2
commit 39c1fcf438
5 changed files with 215 additions and 19 deletions
+13 -1
View File
@@ -171,7 +171,19 @@ function showToast(msg,isErr=false){
t.textContent=msg;t.style.color=isErr?'var(--danger)':'var(--ok)';
t.style.display='block';setTimeout(()=>t.style.display='none',2500);
}
function copyText(text){navigator.clipboard.writeText(text).then(()=>showToast('Скопировано ✓'));}
function copyText(text){
if(navigator.clipboard&&navigator.clipboard.writeText){
navigator.clipboard.writeText(text).then(()=>showToast('Скопировано ✓')).catch(()=>_copyFallback(text));
}else{_copyFallback(text);}
}
function _copyFallback(text){
const ta=document.createElement('textarea');
ta.value=text;ta.style.cssText='position:fixed;opacity:0;top:0;left:0';
document.body.appendChild(ta);ta.focus();ta.select();
try{document.execCommand('copy');showToast('Скопировано ✓');}
catch(e){showToast('Ошибка копирования',true);}
document.body.removeChild(ta);
}
function toggleAccordion(hdr){
hdr.classList.toggle('aopen');
hdr.nextElementSibling.classList.toggle('open');