Spaces:
Running
Running
os testes serão para ios também
Browse files- chatbot.html +39 -29
- components/sidebar.js +2 -2
- index.html +75 -19
- script.js +2 -3
chatbot.html
CHANGED
|
@@ -3,8 +3,8 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>Chatbot -
|
| 7 |
-
|
| 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>
|
|
@@ -30,14 +30,14 @@
|
|
| 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 |
-
|
| 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 |
-
|
| 39 |
</span>
|
| 40 |
-
|
| 41 |
<i data-feather="settings" class="w-4 h-4"></i>
|
| 42 |
Configurações
|
| 43 |
</button>
|
|
@@ -65,12 +65,13 @@
|
|
| 65 |
<div class="message-content">
|
| 66 |
<p>Você pode me pedir para:</p>
|
| 67 |
<ul class="list-disc list-inside ml-4 text-sm text-gray-300 mt-2">
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
</
|
|
|
|
| 74 |
<span class="message-time">Agora</span>
|
| 75 |
</div>
|
| 76 |
</div>
|
|
@@ -101,10 +102,9 @@
|
|
| 101 |
<div class="space-y-3">
|
| 102 |
<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">
|
| 103 |
<i data-feather="download" class="w-4 h-4"></i>
|
| 104 |
-
Instalar
|
| 105 |
</button>
|
| 106 |
-
|
| 107 |
-
<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">
|
| 108 |
<i data-feather="play" class="w-4 h-4"></i>
|
| 109 |
Executar App
|
| 110 |
</button>
|
|
@@ -135,6 +135,16 @@
|
|
| 135 |
<script>
|
| 136 |
feather.replace();
|
| 137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
function sendMessage() {
|
| 139 |
const input = document.getElementById('chatInput');
|
| 140 |
const message = input.value.trim();
|
|
@@ -145,14 +155,13 @@
|
|
| 145 |
|
| 146 |
// Simular resposta do bot após 1 segundo
|
| 147 |
setTimeout(() => {
|
| 148 |
-
simulateBotResponse(message);
|
| 149 |
}, 1000);
|
| 150 |
|
| 151 |
input.value = '';
|
| 152 |
}
|
| 153 |
}
|
| 154 |
-
|
| 155 |
-
function addUserMessage(message) {
|
| 156 |
const chatContainer = document.getElementById('chatContainer');
|
| 157 |
const messageDiv = document.createElement('div');
|
| 158 |
messageDiv.className = 'chat-message user-message';
|
|
@@ -169,29 +178,30 @@
|
|
| 169 |
chatContainer.scrollTop = chatContainer.scrollHeight;
|
| 170 |
feather.replace();
|
| 171 |
}
|
| 172 |
-
|
| 173 |
-
function simulateBotResponse(userMessage) {
|
| 174 |
const chatContainer = document.getElementById('chatContainer');
|
| 175 |
const messageDiv = document.createElement('div');
|
| 176 |
messageDiv.className = 'chat-message bot-message';
|
| 177 |
|
| 178 |
let response = '';
|
|
|
|
| 179 |
|
| 180 |
if (userMessage.toLowerCase().includes('instalar') || userMessage.toLowerCase().includes('install')) {
|
| 181 |
-
response =
|
| 182 |
} else if (userMessage.toLowerCase().includes('executar') || userMessage.toLowerCase().includes('abrir') || userMessage.toLowerCase().includes('run')) {
|
| 183 |
-
response =
|
| 184 |
} else if (userMessage.toLowerCase().includes('tela') || userMessage.toLowerCase().includes('screen')) {
|
| 185 |
-
response =
|
| 186 |
} else if (userMessage.toLowerCase().includes('performance') || userMessage.toLowerCase().includes('desempenho')) {
|
| 187 |
-
response =
|
| 188 |
} else if (userMessage.toLowerCase().includes('navegar') || userMessage.toLowerCase().includes('navigate')) {
|
| 189 |
-
response =
|
|
|
|
|
|
|
| 190 |
} else {
|
| 191 |
-
response =
|
| 192 |
}
|
| 193 |
-
|
| 194 |
-
messageDiv.innerHTML = `
|
| 195 |
<div class="message-avatar">
|
| 196 |
<i data-feather="cpu" class="w-5 h-5"></i>
|
| 197 |
</div>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Chatbot - Mobile 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>
|
|
|
|
| 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 ou iOS usando comandos em linguagem natural</p>
|
| 34 |
</div>
|
| 35 |
+
<div class="flex items-center gap-4">
|
| 36 |
+
<span id="platformBadge" 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 |
+
Android 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>
|
|
|
|
| 65 |
<div class="message-content">
|
| 66 |
<p>Você pode me pedir para:</p>
|
| 67 |
<ul class="list-disc list-inside ml-4 text-sm text-gray-300 mt-2">
|
| 68 |
+
<li>Instalar e executar aplicativos Android/iOS</li>
|
| 69 |
+
<li>Navegar pela interface</li>
|
| 70 |
+
<li>Testar funcionalidades específicas</li>
|
| 71 |
+
<li>Capturar screenshots</li>
|
| 72 |
+
<li>Analisar performance</li>
|
| 73 |
+
<li>Testar compatibilidade entre plataformas</li>
|
| 74 |
+
</ul>
|
| 75 |
<span class="message-time">Agora</span>
|
| 76 |
</div>
|
| 77 |
</div>
|
|
|
|
| 102 |
<div class="space-y-3">
|
| 103 |
<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">
|
| 104 |
<i data-feather="download" class="w-4 h-4"></i>
|
| 105 |
+
Instalar App
|
| 106 |
</button>
|
| 107 |
+
<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">
|
|
|
|
| 108 |
<i data-feather="play" class="w-4 h-4"></i>
|
| 109 |
Executar App
|
| 110 |
</button>
|
|
|
|
| 135 |
<script>
|
| 136 |
feather.replace();
|
| 137 |
|
| 138 |
+
// Verificar parâmetros da URL para saber qual plataforma está sendo testada
|
| 139 |
+
const urlParams = new URLSearchParams(window.location.search);
|
| 140 |
+
const platform = urlParams.get('platform') || 'android';
|
| 141 |
+
|
| 142 |
+
// Atualizar badge da plataforma
|
| 143 |
+
document.getElementById('platformBadge').textContent = platform.charAt(0).toUpperCase() + platform.slice(1) + ' Conectado';
|
| 144 |
+
document.getElementById('platformBadge').className = platform === 'android' ?
|
| 145 |
+
'bg-green-500 text-white px-3 py-1 rounded-full text-sm flex items-center gap-2' :
|
| 146 |
+
'bg-blue-500 text-white px-3 py-1 rounded-full text-sm flex items-center gap-2';
|
| 147 |
+
|
| 148 |
function sendMessage() {
|
| 149 |
const input = document.getElementById('chatInput');
|
| 150 |
const message = input.value.trim();
|
|
|
|
| 155 |
|
| 156 |
// Simular resposta do bot após 1 segundo
|
| 157 |
setTimeout(() => {
|
| 158 |
+
simulateBotResponse(message, platform);
|
| 159 |
}, 1000);
|
| 160 |
|
| 161 |
input.value = '';
|
| 162 |
}
|
| 163 |
}
|
| 164 |
+
function addUserMessage(message) {
|
|
|
|
| 165 |
const chatContainer = document.getElementById('chatContainer');
|
| 166 |
const messageDiv = document.createElement('div');
|
| 167 |
messageDiv.className = 'chat-message user-message';
|
|
|
|
| 178 |
chatContainer.scrollTop = chatContainer.scrollHeight;
|
| 179 |
feather.replace();
|
| 180 |
}
|
| 181 |
+
function simulateBotResponse(userMessage, platform) {
|
|
|
|
| 182 |
const chatContainer = document.getElementById('chatContainer');
|
| 183 |
const messageDiv = document.createElement('div');
|
| 184 |
messageDiv.className = 'chat-message bot-message';
|
| 185 |
|
| 186 |
let response = '';
|
| 187 |
+
const platformName = platform === 'android' ? 'Android' : 'iOS';
|
| 188 |
|
| 189 |
if (userMessage.toLowerCase().includes('instalar') || userMessage.toLowerCase().includes('install')) {
|
| 190 |
+
response = `Instalando o aplicativo no emulador ${platformName}... ✅ Aplicativo instalado com sucesso!`;
|
| 191 |
} else if (userMessage.toLowerCase().includes('executar') || userMessage.toLowerCase().includes('abrir') || userMessage.toLowerCase().includes('run')) {
|
| 192 |
+
response = `Executando o aplicativo no ${platformName}... 🚀 Aplicativo iniciado na tela principal.`;
|
| 193 |
} else if (userMessage.toLowerCase().includes('tela') || userMessage.toLowerCase().includes('screen')) {
|
| 194 |
+
response = `Capturando screenshot da tela atual do ${platformName}... 📸 Screenshot salvo com sucesso!`;
|
| 195 |
} else if (userMessage.toLowerCase().includes('performance') || userMessage.toLowerCase().includes('desempenho')) {
|
| 196 |
+
response = `Analisando performance do aplicativo no ${platformName}... 📊 CPU: 15% | Memória: 128MB | FPS: 60`;
|
| 197 |
} else if (userMessage.toLowerCase().includes('navegar') || userMessage.toLowerCase().includes('navigate')) {
|
| 198 |
+
response = `Navegando pela interface do ${platformName}... 🔄 Navegação concluída com sucesso.`;
|
| 199 |
+
} else if (userMessage.toLowerCase().includes('compatibilidade') || userMessage.toLowerCase().includes('compatibility')) {
|
| 200 |
+
response = `Analisando compatibilidade entre Android e iOS... 🔍 Teste de compatibilidade em andamento.`;
|
| 201 |
} else {
|
| 202 |
+
response = `Comando recebido! Estou processando sua solicitação no emulador ${platformName}. ✅`;
|
| 203 |
}
|
| 204 |
+
messageDiv.innerHTML = `
|
|
|
|
| 205 |
<div class="message-avatar">
|
| 206 |
<i data-feather="cpu" class="w-5 h-5"></i>
|
| 207 |
</div>
|
components/sidebar.js
CHANGED
|
@@ -145,8 +145,8 @@ class CustomSidebar extends HTMLElement {
|
|
| 145 |
<div class="logo-icon">
|
| 146 |
<i data-feather="smartphone"></i>
|
| 147 |
</div>
|
| 148 |
-
<div class="logo-text">Test Pilot</div>
|
| 149 |
-
|
| 150 |
<nav class="nav-items">
|
| 151 |
<a href="index.html" class="nav-item active">
|
| 152 |
<i data-feather="home"></i>
|
|
|
|
| 145 |
<div class="logo-icon">
|
| 146 |
<i data-feather="smartphone"></i>
|
| 147 |
</div>
|
| 148 |
+
<div class="logo-text">Mobile 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>
|
index.html
CHANGED
|
@@ -3,8 +3,8 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>
|
| 7 |
-
|
| 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>
|
|
@@ -28,18 +28,18 @@
|
|
| 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="text-center mb-12">
|
| 31 |
-
<h1 class="text-4xl font-bold mb-4">
|
| 32 |
-
<p class="text-gray-300 text-lg">Teste seus aplicativos Android de forma intuitiva com IA</p>
|
| 33 |
-
|
| 34 |
|
| 35 |
<div class="grid md:grid-cols-2 gap-8 items-center">
|
| 36 |
<div>
|
| 37 |
<h2 class="text-2xl font-semibold mb-4">Inicie um novo teste</h2>
|
| 38 |
<p class="text-gray-300 mb-6">
|
| 39 |
-
Selecione um emulador Android, envie seu aplicativo
|
| 40 |
usando linguagem natural através do nosso chatbot inteligente.
|
| 41 |
</p>
|
| 42 |
-
|
| 43 |
<i data-feather="play" class="w-5 h-5"></i>
|
| 44 |
Iniciar Novo Teste
|
| 45 |
</button>
|
|
@@ -69,9 +69,9 @@
|
|
| 69 |
<div class="w-12 h-12 bg-secondary bg-opacity-20 rounded-full flex items-center justify-center mb-4">
|
| 70 |
<i data-feather="smartphone" class="text-secondary"></i>
|
| 71 |
</div>
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
|
| 76 |
<div class="bg-gray-800 p-6 rounded-2xl border border-gray-700">
|
| 77 |
<div class="w-12 h-12 bg-secondary bg-opacity-20 rounded-full flex items-center justify-center mb-4">
|
|
@@ -104,29 +104,35 @@
|
|
| 104 |
|
| 105 |
<div class="p-6">
|
| 106 |
<div class="mb-6">
|
| 107 |
-
<label class="block text-sm font-medium mb-2">Selecione
|
| 108 |
-
<select class="w-full 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">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
<option>Android 13 - Pixel 6 Pro</option>
|
| 110 |
<option>Android 12 - Pixel 5</option>
|
| 111 |
<option>Android 11 - Pixel 4</option>
|
| 112 |
<option>Android 10 - Pixel 3</option>
|
| 113 |
</select>
|
| 114 |
</div>
|
| 115 |
-
|
| 116 |
<div class="mb-6">
|
| 117 |
-
<label class="block text-sm font-medium mb-2">Upload do Aplicativo
|
| 118 |
<div class="border-2 border-dashed border-gray-700 rounded-lg p-8 text-center hover:border-secondary transition-colors duration-300">
|
| 119 |
<i data-feather="upload-cloud" class="w-12 h-12 text-gray-500 mx-auto mb-4"></i>
|
| 120 |
-
<p class="text-gray-400 mb-2">Arraste o arquivo .apk ou clique para selecionar</p>
|
| 121 |
<p class="text-sm text-gray-500">Tamanho máximo: 100MB</p>
|
| 122 |
-
<input type="file" class="hidden" id="
|
| 123 |
-
<button onclick="document.getElementById('
|
| 124 |
Selecionar Arquivo
|
| 125 |
</button>
|
| 126 |
</div>
|
| 127 |
</div>
|
| 128 |
-
|
| 129 |
-
<div class="flex justify-end gap-3">
|
| 130 |
<button onclick="closeTestModal()" class="px-4 py-2 text-gray-300 hover:text-white transition-colors">
|
| 131 |
Cancelar
|
| 132 |
</button>
|
|
@@ -152,6 +158,56 @@
|
|
| 152 |
document.getElementById('testModal').classList.add('hidden');
|
| 153 |
document.getElementById('testModal').classList.remove('flex');
|
| 154 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
</script>
|
| 156 |
<script src="https://deepsite.hf.co/deepsite-badge.js"></script>
|
| 157 |
</body>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Mobile Test Pilot - Plataforma de Testes</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>
|
|
|
|
| 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="text-center mb-12">
|
| 31 |
+
<h1 class="text-4xl font-bold mb-4">Mobile Test Pilot</h1>
|
| 32 |
+
<p class="text-gray-300 text-lg">Teste seus aplicativos Android e iOS de forma intuitiva com IA</p>
|
| 33 |
+
</div>
|
| 34 |
|
| 35 |
<div class="grid md:grid-cols-2 gap-8 items-center">
|
| 36 |
<div>
|
| 37 |
<h2 class="text-2xl font-semibold mb-4">Inicie um novo teste</h2>
|
| 38 |
<p class="text-gray-300 mb-6">
|
| 39 |
+
Selecione um emulador Android ou iOS, envie seu aplicativo e comece a testar
|
| 40 |
usando linguagem natural através do nosso chatbot inteligente.
|
| 41 |
</p>
|
| 42 |
+
<button onclick="openTestModal()" class="bg-secondary hover:bg-orange-600 text-white font-bold py-3 px-8 rounded-full transition-all duration-300 transform hover:scale-105 flex items-center gap-2">
|
| 43 |
<i data-feather="play" class="w-5 h-5"></i>
|
| 44 |
Iniciar Novo Teste
|
| 45 |
</button>
|
|
|
|
| 69 |
<div class="w-12 h-12 bg-secondary bg-opacity-20 rounded-full flex items-center justify-center mb-4">
|
| 70 |
<i data-feather="smartphone" class="text-secondary"></i>
|
| 71 |
</div>
|
| 72 |
+
<h3 class="text-xl font-semibold mb-2">Emuladores Mobile</h3>
|
| 73 |
+
<p class="text-gray-400">Acesse diversos emuladores Android e iOS configurados e prontos para uso.</p>
|
| 74 |
+
</div>
|
| 75 |
|
| 76 |
<div class="bg-gray-800 p-6 rounded-2xl border border-gray-700">
|
| 77 |
<div class="w-12 h-12 bg-secondary bg-opacity-20 rounded-full flex items-center justify-center mb-4">
|
|
|
|
| 104 |
|
| 105 |
<div class="p-6">
|
| 106 |
<div class="mb-6">
|
| 107 |
+
<label class="block text-sm font-medium mb-2">Selecione a Plataforma</label>
|
| 108 |
+
<select id="platformSelect" class="w-full 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" onchange="updateEmulatorOptions()">
|
| 109 |
+
<option value="android">Android</option>
|
| 110 |
+
<option value="ios">iOS</option>
|
| 111 |
+
</select>
|
| 112 |
+
</div>
|
| 113 |
+
|
| 114 |
+
<div class="mb-6">
|
| 115 |
+
<label class="block text-sm font-medium mb-2">Selecione o Emulador</label>
|
| 116 |
+
<select id="emulatorSelect" class="w-full 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">
|
| 117 |
<option>Android 13 - Pixel 6 Pro</option>
|
| 118 |
<option>Android 12 - Pixel 5</option>
|
| 119 |
<option>Android 11 - Pixel 4</option>
|
| 120 |
<option>Android 10 - Pixel 3</option>
|
| 121 |
</select>
|
| 122 |
</div>
|
|
|
|
| 123 |
<div class="mb-6">
|
| 124 |
+
<label class="block text-sm font-medium mb-2">Upload do Aplicativo</label>
|
| 125 |
<div class="border-2 border-dashed border-gray-700 rounded-lg p-8 text-center hover:border-secondary transition-colors duration-300">
|
| 126 |
<i data-feather="upload-cloud" class="w-12 h-12 text-gray-500 mx-auto mb-4"></i>
|
| 127 |
+
<p class="text-gray-400 mb-2" id="uploadText">Arraste o arquivo .apk ou clique para selecionar</p>
|
| 128 |
<p class="text-sm text-gray-500">Tamanho máximo: 100MB</p>
|
| 129 |
+
<input type="file" class="hidden" id="appUpload" accept=".apk,.ipa">
|
| 130 |
+
<button onclick="document.getElementById('appUpload').click()" class="bg-secondary hover:bg-orange-600 text-white px-4 py-2 rounded-lg mt-4">
|
| 131 |
Selecionar Arquivo
|
| 132 |
</button>
|
| 133 |
</div>
|
| 134 |
</div>
|
| 135 |
+
<div class="flex justify-end gap-3">
|
|
|
|
| 136 |
<button onclick="closeTestModal()" class="px-4 py-2 text-gray-300 hover:text-white transition-colors">
|
| 137 |
Cancelar
|
| 138 |
</button>
|
|
|
|
| 158 |
document.getElementById('testModal').classList.add('hidden');
|
| 159 |
document.getElementById('testModal').classList.remove('flex');
|
| 160 |
}
|
| 161 |
+
|
| 162 |
+
function updateEmulatorOptions() {
|
| 163 |
+
const platform = document.getElementById('platformSelect').value;
|
| 164 |
+
const emulatorSelect = document.getElementById('emulatorSelect');
|
| 165 |
+
const uploadText = document.getElementById('uploadText');
|
| 166 |
+
|
| 167 |
+
emulatorSelect.innerHTML = '';
|
| 168 |
+
|
| 169 |
+
if (platform === 'android') {
|
| 170 |
+
uploadText.textContent = 'Arraste o arquivo .apk ou clique para selecionar';
|
| 171 |
+
const androidOptions = [
|
| 172 |
+
'Android 13 - Pixel 6 Pro',
|
| 173 |
+
'Android 12 - Pixel 5',
|
| 174 |
+
'Android 11 - Pixel 4',
|
| 175 |
+
'Android 10 - Pixel 3'
|
| 176 |
+
];
|
| 177 |
+
androidOptions.forEach(option => {
|
| 178 |
+
const opt = document.createElement('option');
|
| 179 |
+
opt.value = option;
|
| 180 |
+
opt.textContent = option;
|
| 181 |
+
emulatorSelect.appendChild(opt);
|
| 182 |
+
});
|
| 183 |
+
} else {
|
| 184 |
+
uploadText.textContent = 'Arraste o arquivo .ipa ou clique para selecionar';
|
| 185 |
+
const iosOptions = [
|
| 186 |
+
'iOS 16 - iPhone 14 Pro',
|
| 187 |
+
'iOS 15 - iPhone 13 Pro',
|
| 188 |
+
'iOS 14 - iPhone 12 Pro',
|
| 189 |
+
'iOS 13 - iPhone 11 Pro'
|
| 190 |
+
];
|
| 191 |
+
iosOptions.forEach(option => {
|
| 192 |
+
const opt = document.createElement('option');
|
| 193 |
+
opt.value = option;
|
| 194 |
+
opt.textContent = option;
|
| 195 |
+
emulatorSelect.appendChild(opt);
|
| 196 |
+
});
|
| 197 |
+
}
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
// Atualizar opções de arquivo quando a plataforma mudar
|
| 201 |
+
document.getElementById('platformSelect').addEventListener('change', function() {
|
| 202 |
+
const platform = this.value;
|
| 203 |
+
const fileInput = document.getElementById('appUpload');
|
| 204 |
+
|
| 205 |
+
if (platform === 'android') {
|
| 206 |
+
fileInput.setAttribute('accept', '.apk');
|
| 207 |
+
} else {
|
| 208 |
+
fileInput.setAttribute('accept', '.ipa');
|
| 209 |
+
}
|
| 210 |
+
});
|
| 211 |
</script>
|
| 212 |
<script src="https://deepsite.hf.co/deepsite-badge.js"></script>
|
| 213 |
</body>
|
script.js
CHANGED
|
@@ -14,9 +14,8 @@ window.closeTestModal = function() {
|
|
| 14 |
// Drag and drop para upload de arquivo
|
| 15 |
document.addEventListener('DOMContentLoaded', function() {
|
| 16 |
const dropZone = document.querySelector('[class*="border-dashed"]');
|
| 17 |
-
const fileInput = document.getElementById('
|
| 18 |
-
|
| 19 |
-
if (dropZone && fileInput) {
|
| 20 |
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
|
| 21 |
dropZone.addEventListener(eventName, preventDefaults, false);
|
| 22 |
});
|
|
|
|
| 14 |
// Drag and drop para upload de arquivo
|
| 15 |
document.addEventListener('DOMContentLoaded', function() {
|
| 16 |
const dropZone = document.querySelector('[class*="border-dashed"]');
|
| 17 |
+
const fileInput = document.getElementById('appUpload');
|
| 18 |
+
if (dropZone && fileInput) {
|
|
|
|
| 19 |
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
|
| 20 |
dropZone.addEventListener(eventName, preventDefaults, false);
|
| 21 |
});
|