Atualização automática: 2026-05-18 17:10:08

This commit is contained in:
Hermes
2026-05-18 17:10:08 +00:00
parent 8ac0979c67
commit 700c47277d
4 changed files with 155 additions and 34 deletions
+6 -2
View File
@@ -610,14 +610,18 @@ function openClonedSite(directory) {
}
function openCloneFolder(directory) {
showToast('Abrindo pasta no sistema da VPS: ' + directory, 'info');
showToast('Abrindo gerenciador de arquivos web...', 'info');
fetch('/api/open-folder', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ path: directory })
}).then(res => res.json())
.then(data => {
if (!data.success) showToast('Erro ao abrir pasta: ' + (data.error || ''), 'error');
if (!data.success) {
showToast('Erro ao abrir pasta: ' + (data.error || ''), 'error');
} else if (data.url) {
window.open(data.url, '_blank');
}
})
.catch(err => console.error('Erro ao chamar open-folder:', err));
}
+6 -1
View File
@@ -30,7 +30,12 @@ document.getElementById('btnOpenFolder').addEventListener('click', () => {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ path: clonedData.data.path })
});
}).then(res => res.json())
.then(data => {
if (data.success && data.url) {
window.open(data.url, '_blank');
}
});
}
});
+10 -8
View File
@@ -418,20 +418,22 @@ document.addEventListener('DOMContentLoaded', function() {
// Funções para gerenciar sites clonados
function openCloneFolder(directory) {
// Tentar abrir a pasta no explorador do Windows
fetch('/api/open-folder', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ path: directory })
}).then(response => {
if (!response.ok) {
alert('Não foi possível abrir a pasta automaticamente.\nLocalização: ' + directory);
}
}).catch(error => {
alert('Não foi possível abrir a pasta automaticamente.\nLocalização: ' + directory);
});
}).then(response => response.json())
.then(data => {
if (data.success && data.url) {
window.open(data.url, '_blank');
} else {
alert('Não foi possível abrir a pasta.\nLocalização: ' + directory);
}
}).catch(error => {
alert('Não foi possível abrir a pasta.\nLocalização: ' + directory);
});
}
function openClonedSite(directory) {