Spaces:
Running
Running
o chatbot deve ser em uma novo página
Browse files- chatbot.html +117 -0
- components/sidebar.js +7 -4
- index.html +5 -61
- script.js +0 -18
chatbot.html
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="pt-BR">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Chatbot - Android Test Pilot</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
+
<script>
|
| 12 |
+
tailwind.config = {
|
| 13 |
+
theme: {
|
| 14 |
+
extend: {
|
| 15 |
+
colors: {
|
| 16 |
+
primary: '#21223a',
|
| 17 |
+
secondary: '#ff580f',
|
| 18 |
+
}
|
| 19 |
+
}
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
+
</script>
|
| 23 |
+
</head>
|
| 24 |
+
<body class="bg-primary min-h-screen text-white">
|
| 25 |
+
<custom-sidebar></custom-sidebar>
|
| 26 |
+
|
| 27 |
+
<main class="ml-64 p-8">
|
| 28 |
+
<div class="max-w-6xl mx-auto">
|
| 29 |
+
<div class="bg-primary rounded-2xl border border-gray-700 p-8 shadow-2xl">
|
| 30 |
+
<div class="flex items-center justify-between mb-8">
|
| 31 |
+
<div>
|
| 32 |
+
<h1 class="text-3xl font-bold mb-2">Chatbot de Testes</h1>
|
| 33 |
+
<p class="text-gray-300">Teste seu aplicativo Android usando comandos em linguagem natural</p>
|
| 34 |
+
</div>
|
| 35 |
+
<div class="flex items-center gap-4">
|
| 36 |
+
<span class="bg-green-500 text-white px-3 py-1 rounded-full text-sm flex items-center gap-2">
|
| 37 |
+
<i data-feather="circle" class="w-3 h-3"></i>
|
| 38 |
+
Emulador Conectado
|
| 39 |
+
</span>
|
| 40 |
+
<button class="bg-secondary hover:bg-orange-600 text-white px-4 py-2 rounded-lg flex items-center gap-2">
|
| 41 |
+
<i data-feather="settings" class="w-4 h-4"></i>
|
| 42 |
+
Configurações
|
| 43 |
+
</button>
|
| 44 |
+
</div>
|
| 45 |
+
</div>
|
| 46 |
+
|
| 47 |
+
<div class="grid lg:grid-cols-4 gap-8">
|
| 48 |
+
<!-- Área do Chat -->
|
| 49 |
+
<div class="lg:col-span-3">
|
| 50 |
+
<div class="bg-gray-900 rounded-2xl p-6 h-96 overflow-y-auto mb-4">
|
| 51 |
+
<div class="text-center text-gray-400 py-8">
|
| 52 |
+
<i data-feather="message-square" class="w-12 h-12 mx-auto mb-4"></i>
|
| 53 |
+
<p>Chat iniciado. Digite comandos em linguagem natural para testar seu aplicativo.</p>
|
| 54 |
+
</div>
|
| 55 |
+
</div>
|
| 56 |
+
|
| 57 |
+
<div class="flex gap-2">
|
| 58 |
+
<input
|
| 59 |
+
type="text"
|
| 60 |
+
placeholder="Digite seu comando..."
|
| 61 |
+
class="flex-1 bg-gray-800 border border-gray-700 rounded-lg px-4 py-3 text-white focus:border-secondary focus:ring-2 focus:ring-secondary focus:ring-opacity-50"
|
| 62 |
+
>
|
| 63 |
+
<button class="bg-secondary hover:bg-orange-600 text-white px-6 py-3 rounded-lg flex items-center gap-2">
|
| 64 |
+
<i data-feather="send" class="w-4 h-4"></i>
|
| 65 |
+
Enviar
|
| 66 |
+
</button>
|
| 67 |
+
</div>
|
| 68 |
+
</div>
|
| 69 |
+
|
| 70 |
+
<!-- Painel de Ações Rápidas -->
|
| 71 |
+
<div class="lg:col-span-1">
|
| 72 |
+
<div class="bg-gray-800 rounded-2xl p-6 border border-gray-700">
|
| 73 |
+
<h3 class="text-lg font-semibold mb-4 flex items-center gap-2">
|
| 74 |
+
<i data-feather="zap" class="w-5 h-5 text-secondary"></i>
|
| 75 |
+
Ações Rápidas
|
| 76 |
+
</h3>
|
| 77 |
+
|
| 78 |
+
<div class="space-y-3">
|
| 79 |
+
<button class="w-full bg-secondary bg-opacity-20 hover:bg-opacity-30 text-secondary px-4 py-3 rounded-lg flex items-center gap-2 transition-all">
|
| 80 |
+
<i data-feather="download" class="w-4 h-4"></i>
|
| 81 |
+
Instalar APK
|
| 82 |
+
</button>
|
| 83 |
+
|
| 84 |
+
<button class="w-full bg-secondary bg-opacity-20 hover:bg-opacity-30 text-secondary px-4 py-3 rounded-lg flex items-center gap-2 transition-all">
|
| 85 |
+
<i data-feather="play" class="w-4 h-4"></i>
|
| 86 |
+
Executar App
|
| 87 |
+
</button>
|
| 88 |
+
|
| 89 |
+
<button class="w-full bg-secondary bg-opacity-20 hover:bg-opacity-30 text-secondary px-4 py-3 rounded-lg flex items-center gap-2 transition-all">
|
| 90 |
+
<i data-feather="camera" class="w-4 h-4"></i>
|
| 91 |
+
Capturar Tela
|
| 92 |
+
</button>
|
| 93 |
+
|
| 94 |
+
<button class="w-full bg-secondary bg-opacity-20 hover:bg-opacity-30 text-secondary px-4 py-3 rounded-lg flex items-center gap-2 transition-all">
|
| 95 |
+
<i data-feather="bar-chart-2" class="w-4 h-4"></i>
|
| 96 |
+
Performance
|
| 97 |
+
</button>
|
| 98 |
+
|
| 99 |
+
<button class="w-full bg-secondary bg-opacity-20 hover:bg-opacity-30 text-secondary px-4 py-3 rounded-lg flex items-center gap-2 transition-all">
|
| 100 |
+
<i data-feather="alert-circle" class="w-4 h-4"></i>
|
| 101 |
+
Logs de Erro
|
| 102 |
+
</button>
|
| 103 |
+
</div>
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
</div>
|
| 107 |
+
</div>
|
| 108 |
+
</div>
|
| 109 |
+
</main>
|
| 110 |
+
|
| 111 |
+
<script src="components/sidebar.js"></script>
|
| 112 |
+
<script src="script.js"></script>
|
| 113 |
+
<script>
|
| 114 |
+
feather.replace();
|
| 115 |
+
</script>
|
| 116 |
+
</body>
|
| 117 |
+
</html>
|
components/sidebar.js
CHANGED
|
@@ -147,13 +147,17 @@ class CustomSidebar extends HTMLElement {
|
|
| 147 |
</div>
|
| 148 |
<div class="logo-text">Test Pilot</div>
|
| 149 |
</div>
|
| 150 |
-
|
| 151 |
<nav class="nav-items">
|
| 152 |
-
<a href="
|
| 153 |
<i data-feather="home"></i>
|
| 154 |
<span>Dashboard</span>
|
| 155 |
</a>
|
| 156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
<a href="#" class="nav-item">
|
| 158 |
<i data-feather="play"></i>
|
| 159 |
<span>Testes Ativos</span>
|
|
@@ -174,8 +178,7 @@ class CustomSidebar extends HTMLElement {
|
|
| 174 |
<span>Configurações</span>
|
| 175 |
</a>
|
| 176 |
</nav>
|
| 177 |
-
|
| 178 |
-
<div class="sidebar-footer">
|
| 179 |
<div class="user-profile">
|
| 180 |
<div class="user-avatar">
|
| 181 |
<i data-feather="user"></i>
|
|
|
|
| 147 |
</div>
|
| 148 |
<div class="logo-text">Test Pilot</div>
|
| 149 |
</div>
|
|
|
|
| 150 |
<nav class="nav-items">
|
| 151 |
+
<a href="index.html" class="nav-item active">
|
| 152 |
<i data-feather="home"></i>
|
| 153 |
<span>Dashboard</span>
|
| 154 |
</a>
|
| 155 |
|
| 156 |
+
<a href="chatbot.html" class="nav-item">
|
| 157 |
+
<i data-feather="message-square"></i>
|
| 158 |
+
<span>Chatbot</span>
|
| 159 |
+
</a>
|
| 160 |
+
|
| 161 |
<a href="#" class="nav-item">
|
| 162 |
<i data-feather="play"></i>
|
| 163 |
<span>Testes Ativos</span>
|
|
|
|
| 178 |
<span>Configurações</span>
|
| 179 |
</a>
|
| 180 |
</nav>
|
| 181 |
+
<div class="sidebar-footer">
|
|
|
|
| 182 |
<div class="user-profile">
|
| 183 |
<div class="user-avatar">
|
| 184 |
<i data-feather="user"></i>
|
index.html
CHANGED
|
@@ -117,60 +117,15 @@
|
|
| 117 |
<button onclick="closeTestModal()" class="px-4 py-2 text-gray-300 hover:text-white transition-colors">
|
| 118 |
Cancelar
|
| 119 |
</button>
|
| 120 |
-
<
|
| 121 |
<i data-feather="play" class="w-4 h-4"></i>
|
| 122 |
Iniciar Teste
|
| 123 |
-
</
|
| 124 |
-
|
| 125 |
-
</div>
|
| 126 |
-
</div>
|
| 127 |
-
</div>
|
| 128 |
-
|
| 129 |
-
<!-- Modal do Chatbot -->
|
| 130 |
-
<div id="chatbotModal" class="fixed inset-0 bg-black bg-opacity-75 hidden flex items-center justify-center z-50 p-4">
|
| 131 |
-
<div class="bg-primary rounded-2xl border border-gray-700 w-full max-w-4xl h-5/6 flex flex-col">
|
| 132 |
-
<div class="p-4 border-b border-gray-700 flex justify-between items-center">
|
| 133 |
-
<h3 class="text-lg font-semibold">Chatbot de Testes - Android Emulator</h3>
|
| 134 |
-
<button onclick="closeChatbot()" class="text-gray-400 hover:text-white">
|
| 135 |
-
<i data-feather="x"></i>
|
| 136 |
-
</button>
|
| 137 |
-
</div>
|
| 138 |
-
|
| 139 |
-
<div class="flex-1 p-4 overflow-y-auto bg-gray-900 rounded-lg m-4">
|
| 140 |
-
<div class="text-center text-gray-400 py-8">
|
| 141 |
-
<i data-feather="message-square" class="w-12 h-12 mx-auto mb-4"></i>
|
| 142 |
-
<p>Chatbot iniciado. Digite comandos em linguagem natural para testar seu aplicativo.</p>
|
| 143 |
-
</div>
|
| 144 |
-
</div>
|
| 145 |
-
|
| 146 |
-
<div class="p-4 border-t border-gray-700">
|
| 147 |
-
<div class="flex gap-2 justify-center flex-wrap">
|
| 148 |
-
<button class="bg-secondary bg-opacity-20 hover:bg-opacity-30 text-secondary px-4 py-2 rounded-lg flex items-center gap-2 transition-all">
|
| 149 |
-
<i data-feather="download" class="w-4 h-4"></i>
|
| 150 |
-
Instalar Aplicativo
|
| 151 |
-
</button>
|
| 152 |
-
<button class="bg-secondary bg-opacity-20 hover:bg-opacity-30 text-secondary px-4 py-2 rounded-lg flex items-center gap-2 transition-all">
|
| 153 |
-
<i data-feather="play" class="w-4 h-4"></i>
|
| 154 |
-
Rodar Testes
|
| 155 |
-
</button>
|
| 156 |
-
<button class="bg-secondary bg-opacity-20 hover:bg-opacity-30 text-secondary px-4 py-2 rounded-lg flex items-center gap-2 transition-all">
|
| 157 |
-
<i data-feather="image" class="w-4 h-4"></i>
|
| 158 |
-
Abrir Evidências
|
| 159 |
-
</button>
|
| 160 |
-
<button class="bg-secondary bg-opacity-20 hover:bg-opacity-30 text-secondary px-4 py-2 rounded-lg flex items-center gap-2 transition-all">
|
| 161 |
-
<i data-feather="trash-2" class="w-4 h-4"></i>
|
| 162 |
-
Excluir Mensagens
|
| 163 |
-
</button>
|
| 164 |
-
<button class="bg-secondary bg-opacity-20 hover:bg-opacity-30 text-secondary px-4 py-2 rounded-lg flex items-center gap-2 transition-all">
|
| 165 |
-
<i data-feather="settings" class="w-4 h-4"></i>
|
| 166 |
-
Configuração
|
| 167 |
-
</button>
|
| 168 |
-
</div>
|
| 169 |
</div>
|
| 170 |
</div>
|
| 171 |
</div>
|
| 172 |
-
|
| 173 |
-
<script src="components/sidebar.js"></script>
|
| 174 |
<script src="script.js"></script>
|
| 175 |
<script>
|
| 176 |
feather.replace();
|
|
@@ -184,18 +139,7 @@
|
|
| 184 |
document.getElementById('testModal').classList.add('hidden');
|
| 185 |
document.getElementById('testModal').classList.remove('flex');
|
| 186 |
}
|
| 187 |
-
|
| 188 |
-
function startChatbot() {
|
| 189 |
-
closeTestModal();
|
| 190 |
-
document.getElementById('chatbotModal').classList.remove('hidden');
|
| 191 |
-
document.getElementById('chatbotModal').classList.add('flex');
|
| 192 |
-
}
|
| 193 |
-
|
| 194 |
-
function closeChatbot() {
|
| 195 |
-
document.getElementById('chatbotModal').classList.add('hidden');
|
| 196 |
-
document.getElementById('chatbotModal').classList.remove('flex');
|
| 197 |
-
}
|
| 198 |
-
</script>
|
| 199 |
<script src="https://deepsite.hf.co/deepsite-badge.js"></script>
|
| 200 |
</body>
|
| 201 |
</html>
|
|
|
|
| 117 |
<button onclick="closeTestModal()" class="px-4 py-2 text-gray-300 hover:text-white transition-colors">
|
| 118 |
Cancelar
|
| 119 |
</button>
|
| 120 |
+
<a href="chatbot.html" class="bg-secondary hover:bg-orange-600 text-white px-6 py-2 rounded-lg transition-colors duration-300 flex items-center gap-2">
|
| 121 |
<i data-feather="play" class="w-4 h-4"></i>
|
| 122 |
Iniciar Teste
|
| 123 |
+
</a>
|
| 124 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
</div>
|
| 126 |
</div>
|
| 127 |
</div>
|
| 128 |
+
<script src="components/sidebar.js"></script>
|
|
|
|
| 129 |
<script src="script.js"></script>
|
| 130 |
<script>
|
| 131 |
feather.replace();
|
|
|
|
| 139 |
document.getElementById('testModal').classList.add('hidden');
|
| 140 |
document.getElementById('testModal').classList.remove('flex');
|
| 141 |
}
|
| 142 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
<script src="https://deepsite.hf.co/deepsite-badge.js"></script>
|
| 144 |
</body>
|
| 145 |
</html>
|
script.js
CHANGED
|
@@ -11,24 +11,6 @@ window.closeTestModal = function() {
|
|
| 11 |
document.getElementById('testModal').classList.add('hidden');
|
| 12 |
document.getElementById('testModal').classList.remove('flex');
|
| 13 |
}
|
| 14 |
-
|
| 15 |
-
window.startChatbot = function() {
|
| 16 |
-
const fileInput = document.getElementById('apkUpload');
|
| 17 |
-
if (fileInput.files.length === 0) {
|
| 18 |
-
alert('Por favor, selecione um arquivo .apk para continuar.');
|
| 19 |
-
return;
|
| 20 |
-
}
|
| 21 |
-
|
| 22 |
-
closeTestModal();
|
| 23 |
-
document.getElementById('chatbotModal').classList.remove('hidden');
|
| 24 |
-
document.getElementById('chatbotModal').classList.add('flex');
|
| 25 |
-
}
|
| 26 |
-
|
| 27 |
-
window.closeChatbot = function() {
|
| 28 |
-
document.getElementById('chatbotModal').classList.add('hidden');
|
| 29 |
-
document.getElementById('chatbotModal').classList.remove('flex');
|
| 30 |
-
}
|
| 31 |
-
|
| 32 |
// Drag and drop para upload de arquivo
|
| 33 |
document.addEventListener('DOMContentLoaded', function() {
|
| 34 |
const dropZone = document.querySelector('[class*="border-dashed"]');
|
|
|
|
| 11 |
document.getElementById('testModal').classList.add('hidden');
|
| 12 |
document.getElementById('testModal').classList.remove('flex');
|
| 13 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
// Drag and drop para upload de arquivo
|
| 15 |
document.addEventListener('DOMContentLoaded', function() {
|
| 16 |
const dropZone = document.querySelector('[class*="border-dashed"]');
|