From 49add31133dd30d03fbe5e0c165400c2cdcde120 Mon Sep 17 00:00:00 2001 From: admtracksteel Date: Fri, 5 Jun 2026 12:47:43 +0000 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20de=20sintaxe=20JS=20e=20im?= =?UTF-8?q?plementa=C3=A7=C3=A3o=20do=20bot=C3=A3o=20flutuante=20de=20ferr?= =?UTF-8?q?amentas=20no=20mobile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/app.js | 16 ++++++++------- public/index.html | 13 ++++++------ public/style.css | 50 +++++++++++++++++++++++++++++++---------------- 3 files changed, 49 insertions(+), 30 deletions(-) diff --git a/public/app.js b/public/app.js index 23befd2..8da31e5 100644 --- a/public/app.js +++ b/public/app.js @@ -1087,14 +1087,14 @@ const initApp = () => { fileInput.click(); }); - // Botão alternador de ferramentas (recursos) - const btnToggleTools = document.getElementById('btnToggleTools'); + // Botão alternador de ferramentas (recursos) - FAB Tools + const fabTools = document.getElementById('fabTools'); const promptModesBar = document.querySelector('.prompt-modes-bar'); - if (btnToggleTools && promptModesBar) { - btnToggleTools.addEventListener('click', () => { + if (fabTools && promptModesBar) { + fabTools.addEventListener('click', () => { promptModesBar.classList.toggle('show'); - btnToggleTools.classList.toggle('active'); + fabTools.classList.toggle('active'); }); } @@ -1791,6 +1791,8 @@ const initApp = () => { if (lastUserMsg && lastUserMsg.role === 'user') { handleSendMessage(lastUserMsg.content, true); } + }; + const scrollToBottom = () => { messagesContainer.scrollTop = messagesContainer.scrollHeight; }; @@ -1955,7 +1957,7 @@ const initApp = () => { // Fechar barra de prompt no mobile se estiver aberta para liberar espaço const mobilePromptBar = document.querySelector('.prompt-modes-bar'); - const mobileToggleBtn = document.getElementById('btnToggleTools'); + const mobileToggleBtn = document.getElementById('fabTools'); if (mobilePromptBar && window.innerWidth <= 768) { mobilePromptBar.classList.remove('show'); if (mobileToggleBtn) mobileToggleBtn.classList.remove('active'); @@ -2274,7 +2276,7 @@ const initApp = () => { btn.addEventListener('click', () => { if (window.innerWidth <= 768) { if (promptModesBar) promptModesBar.classList.remove('show'); - if (btnToggleTools) btnToggleTools.classList.remove('active'); + if (fabTools) fabTools.classList.remove('active'); } if (btn.dataset.prompt) { handleSendMessage(btn.dataset.prompt); diff --git a/public/index.html b/public/index.html index 0db6f22..5f0c81c 100644 --- a/public/index.html +++ b/public/index.html @@ -148,6 +148,13 @@ + + + @@ -255,12 +262,6 @@ -