Atualização automática: 2026-05-24 01:35:40
This commit is contained in:
@@ -230,34 +230,21 @@ async function loadDesignerClonesSelect() {
|
||||
async function startDesign() {
|
||||
const selectEl = document.getElementById('designerCloneSelect');
|
||||
const urlEl = document.getElementById('designUrl');
|
||||
const customPathEl = document.getElementById('designerCustomPath');
|
||||
|
||||
const customPath = customPathEl?.value?.trim();
|
||||
|
||||
// Se informou caminho específico (nova funcionalidade)
|
||||
if (customPath) {
|
||||
agentsState.designer.currentClone = {
|
||||
directory: customPath,
|
||||
name: customPath.split('/').pop() || 'Site Customizado',
|
||||
url: customPath,
|
||||
isCustomPath: true
|
||||
};
|
||||
}
|
||||
// Se escolheu na droplist
|
||||
else if (selectEl && selectEl.value) {
|
||||
if (selectEl && selectEl.value) {
|
||||
agentsState.designer.currentClone = {
|
||||
directory: 'cloned-sites/' + selectEl.value,
|
||||
name: selectEl.value.split('_')[0],
|
||||
url: 'https://' + selectEl.value.split('_')[0],
|
||||
isCustomPath: false
|
||||
url: 'https://' + selectEl.value.split('_')[0]
|
||||
};
|
||||
} else {
|
||||
const url = urlEl?.value?.trim();
|
||||
if (!url) {
|
||||
showAgentError('Designer', 'Selecione um site, insira uma URL ou informe um Caminho Específico de pasta.');
|
||||
showAgentError('Designer', 'Selecione um site já clonado na lista ou insira uma URL válida.');
|
||||
return;
|
||||
}
|
||||
agentsState.designer.currentClone = { url, name: 'Site selecionado', isCustomPath: false };
|
||||
agentsState.designer.currentClone = { url, name: 'Site selecionado' };
|
||||
}
|
||||
|
||||
setDesignerWorking(true);
|
||||
@@ -336,8 +323,7 @@ async function applyUltraModernRedesign(cloneDir) {
|
||||
appliedStyles,
|
||||
elementsRedesigned,
|
||||
outputDir: settings.outputDir,
|
||||
agentName: 'designer',
|
||||
isCustomPath: agentsState.designer?.currentClone?.isCustomPath || false
|
||||
agentName: 'designer'
|
||||
})
|
||||
});
|
||||
const data = await response.json();
|
||||
|
||||
@@ -422,12 +422,7 @@
|
||||
<div class="agent-inputs">
|
||||
<input type="text" id="designUrl" class="form-control" placeholder="URL do site para redesign...">
|
||||
|
||||
<div class="mt-3">
|
||||
<label><i class="fas fa-folder-open"></i> OU Informar Caminho Específico da Pasta (Host/Diretório)</label>
|
||||
<input type="text" id="designerCustomPath" class="form-control" placeholder="ex: /root/Desktop/CLONE_SITE/meu_site">
|
||||
<small class="text-muted">Se preenchido, o agente usará esta pasta exata ignorando a seleção acima.</small>
|
||||
</div>
|
||||
<button id="startDesignBtn" class="btn btn-primary">
|
||||
<button id="startDesignBtn" class="btn btn-primary mt-3">
|
||||
<i class="fas fa-rocket"></i> Iniciar Redesign
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user