Atualização automática: 2026-05-18 11:42:47
This commit is contained in:
@@ -600,7 +600,7 @@ function openClonedSite(directory) {
|
|||||||
}).then(response => {
|
}).then(response => {
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
// Server is running, open the site via same origin
|
// 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');
|
window.open(`/${siteName}/index.html`, '_blank');
|
||||||
} else {
|
} else {
|
||||||
showToast('Servidor não está respondendo.', 'error');
|
showToast('Servidor não está respondendo.', 'error');
|
||||||
@@ -611,9 +611,16 @@ function openClonedSite(directory) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openCloneFolder(directory) {
|
function openCloneFolder(directory) {
|
||||||
showToast('Abrindo pasta: ' + directory, 'info');
|
showToast('Abrindo pasta no sistema da VPS: ' + directory, 'info');
|
||||||
// In a real app, this would use an API endpoint to open the folder
|
fetch('/api/open-folder', {
|
||||||
console.log('Open folder:', directory);
|
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') {
|
function showToast(message, type = 'info') {
|
||||||
|
|||||||
Reference in New Issue
Block a user