Spaces:
Sleeping
Sleeping
Upload chat.html
Browse files- frontend/chat.html +2 -2
frontend/chat.html
CHANGED
|
@@ -601,7 +601,7 @@ function addBubble(role, text, timestamp) {
|
|
| 601 |
row.className = `msg-row ${role}`;
|
| 602 |
const avatar = document.createElement('div');
|
| 603 |
avatar.className = `avatar ${role}`;
|
| 604 |
-
avatar.textContent = role==='ai' ? '
|
| 605 |
const inner = document.createElement('div');
|
| 606 |
const bubble = document.createElement('div');
|
| 607 |
bubble.className = `bubble ${role}`;
|
|
@@ -618,7 +618,7 @@ function addBubble(role, text, timestamp) {
|
|
| 618 |
function addTyping() {
|
| 619 |
const msgs = document.getElementById('messages');
|
| 620 |
const row=document.createElement('div'); row.className='msg-row ai';
|
| 621 |
-
const av=document.createElement('div'); av.className='avatar ai'; av.textContent='
|
| 622 |
const b=document.createElement('div'); b.className='typing-bubble';
|
| 623 |
b.innerHTML='<div class="dot"></div><div class="dot"></div><div class="dot"></div>';
|
| 624 |
row.appendChild(av); row.appendChild(b); msgs.appendChild(row); msgs.scrollTop=msgs.scrollHeight;
|
|
|
|
| 601 |
row.className = `msg-row ${role}`;
|
| 602 |
const avatar = document.createElement('div');
|
| 603 |
avatar.className = `avatar ${role}`;
|
| 604 |
+
avatar.textContent = role==='ai' ? 'AQ' : (currentUser ? currentUser.username[0].toUpperCase() : 'U');
|
| 605 |
const inner = document.createElement('div');
|
| 606 |
const bubble = document.createElement('div');
|
| 607 |
bubble.className = `bubble ${role}`;
|
|
|
|
| 618 |
function addTyping() {
|
| 619 |
const msgs = document.getElementById('messages');
|
| 620 |
const row=document.createElement('div'); row.className='msg-row ai';
|
| 621 |
+
const av=document.createElement('div'); av.className='avatar ai'; av.textContent='AQ';
|
| 622 |
const b=document.createElement('div'); b.className='typing-bubble';
|
| 623 |
b.innerHTML='<div class="dot"></div><div class="dot"></div><div class="dot"></div>';
|
| 624 |
row.appendChild(av); row.appendChild(b); msgs.appendChild(row); msgs.scrollTop=msgs.scrollHeight;
|