fix: дизайн как Личный Кабинет — карточки, светлый фон, как в lang
This commit is contained in:
+7
-5
@@ -36,7 +36,9 @@
|
||||
|
||||
<div id="status"></div>
|
||||
|
||||
<div id="chat"></div>
|
||||
<div class="card">
|
||||
<div id="chat"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sidebar">
|
||||
@@ -75,8 +77,8 @@
|
||||
document.querySelectorAll('.hitem').forEach(el => {
|
||||
el.onclick = () => {
|
||||
const h = history[+el.dataset.idx];
|
||||
chat.innerHTML += '<div class="user">📋 ' + fmt(h.q) + '</div>';
|
||||
chat.innerHTML += '<div class="bot">🤖 ' + fmt(h.a) + '</div>';
|
||||
chat.innerHTML += '<div class="msg user">📋 ' + fmt(h.q) + '</div>';
|
||||
chat.innerHTML += '<div class="msg bot">🤖 ' + fmt(h.a) + '</div>';
|
||||
chat.scrollTop = chat.scrollHeight;
|
||||
};
|
||||
});
|
||||
@@ -191,7 +193,7 @@
|
||||
clearTimeout(to);
|
||||
const tData = await tRes.json();
|
||||
const text = tData.text || '(не распознано)';
|
||||
chat.innerHTML += '<div class="user">🗣 ' + fmt(text) + '</div>';
|
||||
chat.innerHTML += '<div class="msg user">🗣 ' + fmt(text) + '</div>';
|
||||
chat.scrollTop = chat.scrollHeight;
|
||||
|
||||
startThinkTimer();
|
||||
@@ -207,7 +209,7 @@
|
||||
chatHistory.push({ role: 'user', content: text });
|
||||
chatHistory.push({ role: 'assistant', content: resp });
|
||||
if (chatHistory.length > 40) chatHistory = chatHistory.slice(-40);
|
||||
chat.innerHTML += '<div class="bot">🤖 ' + fmt(resp) + '</div>';
|
||||
chat.innerHTML += '<div class="msg bot">🤖 ' + fmt(resp) + '</div>';
|
||||
chat.scrollTop = chat.scrollHeight;
|
||||
setStatus('✅ Готово — ' + ((Date.now() - thinkStart) / 1000).toFixed(1) + 'с');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user