feat(LIA): botón minimizar visible con ícono — / ▲ en header
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
f2ce60137a
commit
e1738d3fa4
@@ -347,6 +347,9 @@ try {
|
|||||||
<button id="btnTTS" class="btn-tts" onclick="event.stopPropagation();toggleTTS()" title="Activar/silenciar voz">
|
<button id="btnTTS" class="btn-tts" onclick="event.stopPropagation();toggleTTS()" title="Activar/silenciar voz">
|
||||||
<i class="fas fa-volume-up"></i>
|
<i class="fas fa-volume-up"></i>
|
||||||
</button>
|
</button>
|
||||||
|
<button class="btn-tts" onclick="event.stopPropagation();minimizarIA(event)" title="Minimizar" id="btnMin">
|
||||||
|
<i class="fas fa-minus" id="iconMin"></i>
|
||||||
|
</button>
|
||||||
<button class="btn-close" onclick="event.stopPropagation();toggleAI()"></button>
|
<button class="btn-close" onclick="event.stopPropagation();toggleAI()"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="ai-body" id="aiBody">
|
<div class="ai-body" id="aiBody">
|
||||||
@@ -777,9 +780,11 @@ function enviarRapido(pregunta) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function minimizarIA(e) {
|
function minimizarIA(e) {
|
||||||
if (e.target.closest('button')) return;
|
if (e && e.target && e.target.closest && e.target.closest('button:not(#btnMin)')) return;
|
||||||
_aiMinimized = !_aiMinimized;
|
_aiMinimized = !_aiMinimized;
|
||||||
document.getElementById('aiPanel').classList.toggle('minimized', _aiMinimized);
|
document.getElementById('aiPanel').classList.toggle('minimized', _aiMinimized);
|
||||||
|
const icon = document.getElementById('iconMin');
|
||||||
|
if (icon) icon.className = _aiMinimized ? 'fas fa-chevron-up' : 'fas fa-minus';
|
||||||
}
|
}
|
||||||
|
|
||||||
function _liaGreet() {
|
function _liaGreet() {
|
||||||
|
|||||||
Reference in New Issue
Block a user