Atualização automática: 2026-05-18 11:42:47

This commit is contained in:
Hermes
2026-05-18 11:42:47 +00:00
parent 1fde3c5cab
commit 1c44bb1617
+11 -4
View File
@@ -600,7 +600,7 @@ function openClonedSite(directory) {
}).then(response => {
if (response.ok) {
// Server is running, open the site via same origin
const siteName = directory.split('/').pop();
const siteName = directory.replace(/\\/g, '/').split('/').pop();
window.open(`/${siteName}/index.html`, '_blank');
} else {
showToast('Servidor não está respondendo.', 'error');
@@ -611,9 +611,16 @@ function openClonedSite(directory) {
}
function openCloneFolder(directory) {
showToast('Abrindo pasta: ' + directory, 'info');
// In a real app, this would use an API endpoint to open the folder
console.log('Open folder:', directory);
showToast('Abrindo pasta no sistema da VPS: ' + directory, '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');
})
.catch(err => console.error('Erro ao chamar open-folder:', err));
}
function showToast(message, type = 'info') {