Atualização automática: 2026-05-18 17:10:08
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user