Continua não abrindo janela de inserçao de html e os botões não permitem acionamento. Corrija - Follow Up Deployment
Browse files13 unmodified lines141516171819202122232425262728293051 unmodified lines8283847778858687888990919293949557 unmodified lines15315415514214315615715815916016116216316416516616716816917017117226 unmodified lines19920020120220320420520639 unmodified lines2462472482212222492502512522535 unmodified lines25926026126226326426526624 unmodified lines29129229326429429529629729829927030030130230313 unmodified lines border-radius: 8px; background-color: #ecf0f1; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease; } .upload-area:hover { background-color: #d6dbdf; border-color: #2980b9; box-shadow: 0 0 10px rgba(52, 152, 219, 0.3); } .upload-area p { pointer-events: none; } #file-input { display: none;51 unmodified lines <h1 class="text-3xl font-bold text-center text-gray-800 mb-6">Processador de XML/HTML para CSV/XLSX</h1> <div class="upload-area" id="upload-area"> <p class="text-gray-700">Clique aqui ou arraste arquivos XML ou HTML para fazer upload (máximo: 100)</p> <input type="file" id="file-input" accept=".xml,.html" multiple> <p class="text-gray-700 font-medium"> <svg xmlns="http://www.w3.org/2000/svg" class="h-10 w-10 mx-auto mb-2 text-blue-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" /> </svg> Clique aqui ou arraste arquivos XML ou HTML<br> <span class="text-sm text-gray-600">Formatos aceitos: .xml, .html (máximo: 100 arquivos)</span> </p> <input type="file" id="file-input" accept=".xml,.html,.htm,text/xml,text/html" multiple style="position: absolute; opacity: 0; width: 100%; height: 100%; top: 0; left: 0; cursor: pointer;"> </div> <div id="status-area"></div>57 unmodified lines let xlsxBlob = null; // Upload area click handler uploadArea.addEventListener('click', function() { fileInput.click(); uploadArea.addEventListener('click', function(e) { // Prevent double triggering if (e.target.tagName !== 'INPUT') { fileInput.click(); } });
// Make sure file input change is properly handled fileInput.addEventListener('change', function() { if (this.files && this.files.length > 0) { handleFiles(this.files); // Reset input to allow selecting same file again this.value = ''; } }); // Drag and drop handlers26 unmodified lines processBtn.addEventListener('click', function() { if (currentFiles.length) { processFiles(currentFiles); } else { showStatus('Nenhum arquivo selecionado para processar.', 'error'); } }); 39 unmodified lines for (let i = 0; i < files.length && validFiles.length + currentFiles.length < maxFiles; i++) { const file = files[i]; if (file.type === 'text/xml' || file.type === 'text/html' || file.name.endsWith('.xml') || file.name.endsWith('.html')) { if (file.type === 'text/xml' || file.type === 'text/html' || file.type === '' || file.name.endsWith('.xml') || file.name.endsWith('.html') || file.name.endsWith('.htm')) { validFiles.push(file); } }5 unmodified lines currentFiles = [...currentFiles, ...validFiles]; processBtn.disabled = false; pdfBtn.disabled = true; xlsxBtn.disabled = true; updateFileList(); showStatus(`${currentFiles.length} arquivo(s) selecionado(s). Clique em "Processar Arquivos" para continuar.`, 'success'); } else {24 unmodified lines } } function updateSelectedCount() { window.updateSelectedCount = function() { const selected = document.querySelectorAll('.file-checkbox:checked').length; selectedCount.textContent = `${selected} arquivo(s) selecionado(s)`; pdfBtn.disabled = selected === 0; } function removeFile(index) { window.removeFile = function(index) { currentFiles.splice(index, 1); updateFileList(); if (currentFiles.length === 0) {index.html+38-8