|
13 | 13 | <p id="tt-status" class="text-[10px] font-mono mt-1.5 flex items-center gap-1.5"></p> |
14 | 14 | </div> |
15 | 15 | <!-- Chat panel --> |
16 | | - <div id="chat-panel" class="absolute right-0 top-0 bottom-0 w-[280px] bg-[#0c0c10]/95 backdrop-blur-xl border-l border-indigo-500/15 flex flex-col z-40 translate-x-full transition-transform duration-300" style="border-radius: 0 0.75rem 0.75rem 0;"> |
| 16 | + <div id="chat-panel" class="absolute right-0 top-0 bottom-0 w-[280px] bg-[#0c0c10]/95 backdrop-blur-xl border-l border-indigo-500/15 flex flex-col z-40 transition-transform duration-300" style="border-radius: 0 0.75rem 0.75rem 0; transform: translateX(100%)"> |
17 | 17 | <div class="flex items-center justify-between px-3 py-2.5 border-b border-zinc-800/50"> |
18 | 18 | <div class="flex items-center gap-2"> |
19 | 19 | <span id="chat-dot" class="w-2 h-2 rounded-full bg-indigo-400"></span> |
|
26 | 26 | <div id="chat-messages" class="flex-1 overflow-y-auto px-3 py-3 space-y-2.5 text-[11px] leading-relaxed scrollbar-thin"></div> |
27 | 27 | <div class="px-3 py-2 border-t border-zinc-800/50 space-y-1.5"> |
28 | 28 | <form id="chat-form" class="flex gap-1.5"> |
29 | | - <input id="chat-input" type="text" placeholder="Talk to this node..." class="flex-1 px-2.5 py-1.5 rounded-md border border-zinc-700/50 bg-zinc-900/50 text-[11px] text-white placeholder:text-zinc-600 focus:outline-none focus:border-indigo-500/40 transition-colors" /> |
| 29 | + <input id="chat-input" type="text" placeholder="Type as Human..." class="flex-1 px-2.5 py-1.5 rounded-md border border-zinc-700/50 bg-zinc-900/50 text-[11px] text-white placeholder:text-zinc-600 focus:outline-none focus:border-indigo-500/40 transition-colors" /> |
30 | 30 | <button type="submit" class="px-2.5 py-1.5 rounded-md bg-indigo-500 hover:bg-indigo-400 text-white text-[10px] font-medium transition-colors">Send</button> |
31 | 31 | </form> |
32 | 32 | <p class="text-[9px] text-zinc-600 text-center">Simulated · Powered by Groq</p> |
|
171 | 171 | function openChat(idx: number) { |
172 | 172 | chatNodeIdx = idx; |
173 | 173 | chatOpen = true; |
174 | | - chatPanel.classList.remove('translate-x-full'); |
| 174 | + chatPanel.style.transform = 'translateX(0)'; |
175 | 175 | const info = nodeInfo[idx]; |
176 | 176 | chatTitle.textContent = info.name; |
177 | 177 | chatDot.style.backgroundColor = info.statusColor; |
|
196 | 196 |
|
197 | 197 | function closeChat() { |
198 | 198 | chatOpen = false; |
199 | | - chatPanel.classList.add('translate-x-full'); |
| 199 | + chatPanel.style.transform = 'translateX(100%)'; |
200 | 200 | chatNodeIdx = -1; |
201 | 201 | if (chatAbort) { chatAbort.abort(); chatAbort = null; } |
202 | 202 | } |
|
0 commit comments