diff --git a/docs/cabinet.html b/docs/cabinet.html index 3140cf4..58be971 100644 --- a/docs/cabinet.html +++ b/docs/cabinet.html @@ -63,7 +63,7 @@ body{font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);displ .btn{font-family:'Inter';font-weight:600;border:none;cursor:pointer;border-radius:10px;display:inline-flex;align-items:center;gap:7px;white-space:nowrap} .btn-p{background:var(--primary);color:#fff;font-size:13px;padding:10px 18px} .btn-p:hover{background:var(--dark)}.btn-p:disabled{opacity:.5;cursor:default} -.scroll{flex:1;overflow-y:auto} +.scroll{flex:1;overflow-y:auto;overflow-anchor:none} /* Chat */ .chat{padding:24px 26px;display:flex;flex-direction:column;gap:14px} /* Спросить Елену — док на этапах 3-5 */ @@ -389,6 +389,7 @@ function go(n){ document.querySelectorAll('.si').forEach(s=>s.classList.remove('active')); document.getElementById('si'+n).classList.add('active'); if(PCTS[n]!=null){document.getElementById('pbPct').textContent=PCTS[n]+'%';document.getElementById('pbFill').style.width=PCTS[n]+'%';} + if(n===1)requestAnimationFrame(scrollChatBottom); // sv1 уже видим — высота посчитана, прыгаем вниз без «пролёта» if(n===3)renderDocs(); if(n===4)renderAnalysis(); if(n===5)renderSpecPane(); @@ -431,8 +432,10 @@ function startMic(){recording=true;document.getElementById("micBtn").classList.a function stopMic(){recording=false;document.getElementById("micBtn").classList.remove("rec");document.getElementById("micHint").classList.remove("show");try{recog.stop()}catch(e){}inp.focus()} /* ── Chat ── */ -function addMsg(role,text){const m=document.createElement("div");m.className="msg "+(role==="user"?"user":"");m.innerHTML=`
${role==='user'?'Я':'Е'}
${fmt(text)}
`;chat.appendChild(m);chat.scrollTop=chat.scrollHeight} -function showTyping(){const t=document.createElement("div");t.className="msg";t.id="typing";t.innerHTML=`
Е
`;chat.appendChild(t);chat.scrollTop=chat.scrollHeight} +// Скроллит реальный контейнер (.scroll), а не .chat (у него нет своего скролла). Мгновенно, без анимации. +function scrollChatBottom(){const sc=chat.parentElement;if(sc)sc.scrollTop=sc.scrollHeight;} +function addMsg(role,text){const m=document.createElement("div");m.className="msg "+(role==="user"?"user":"");m.innerHTML=`
${role==='user'?'Я':'Е'}
${fmt(text)}
`;chat.appendChild(m);scrollChatBottom()} +function showTyping(){const t=document.createElement("div");t.className="msg";t.id="typing";t.innerHTML=`
Е
`;chat.appendChild(t);scrollChatBottom()} function hideTyping(){const t=document.getElementById("typing");if(t)t.remove()} /* ── Спросить Елену (этапы 3-5) ── */ diff --git a/docs/crm.html b/docs/crm.html index 1d4b760..885e726 100644 --- a/docs/crm.html +++ b/docs/crm.html @@ -35,7 +35,7 @@ body{font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);displ .cl-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0} .sb-new{margin:8px 10px;display:flex;align-items:center;justify-content:center;gap:7px;padding:10px;border-radius:9px;background:var(--primary);color:#fff;border:none;cursor:pointer;font-family:'Inter';font-weight:700;font-size:13px} .main{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0} -.scroll{flex:1;overflow-y:auto;padding:24px 28px} +.scroll{flex:1;overflow-y:auto;padding:24px 28px;overflow-anchor:none} /* Dashboard */ .kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px} .kpi{background:var(--white);border:1.5px solid var(--border);border-radius:10px;padding:13px 16px}