🚀 Auto-deploy: BrainKP atualizado em 25/07/2026 19:55:59
This commit is contained in:
@@ -221,6 +221,7 @@ input,button,select{font-family:inherit}
|
||||
</div>
|
||||
<div class="modal-body" id="modal-body"></div>
|
||||
<div class="modal-footer" id="modal-footer">
|
||||
<a id="modal-download" class="btn" style="display:none; text-decoration:none;" target="_blank">📥 Baixar</a>
|
||||
<button class="btn" onclick="closeModal()">Cancelar</button>
|
||||
<button class="btn btn-primary" id="modal-confirm" onclick="doRestore()">Restaurar</button>
|
||||
</div>
|
||||
@@ -504,6 +505,7 @@ function openRestoreModal(type, filename, size) {
|
||||
<div class="progress-bar" id="dl-progress"><div class="fill" style="width:0%"></div></div>
|
||||
`;
|
||||
document.getElementById('modal-confirm').style.display = 'inline-block';
|
||||
document.getElementById('modal-download').style.display = 'none';
|
||||
document.getElementById('restore-modal').classList.add('show');
|
||||
|
||||
// Start download
|
||||
@@ -542,6 +544,8 @@ function openRestoreModal(type, filename, size) {
|
||||
` cp -r ${d.extracted_to}/* /var/lib/docker/volumes/yccsckck4g004gosccwc4kg4_gitea-data/_data/`;
|
||||
}
|
||||
document.getElementById('restore-instructions').value = instructions || 'Pronto para uso.';
|
||||
document.getElementById('modal-download').href = `/api/download/${filename}`;
|
||||
document.getElementById('modal-download').style.display = 'inline-block';
|
||||
} else {
|
||||
document.getElementById('restore-instructions').value = `Erro: ${d.error}`;
|
||||
}
|
||||
@@ -569,6 +573,7 @@ function openRestoreRepo(owner, repoName, size) {
|
||||
<textarea id="restore-instructions" disabled>Baixando e preparando...</textarea>
|
||||
</div>
|
||||
`;
|
||||
document.getElementById('modal-download').style.display = 'none';
|
||||
document.getElementById('restore-modal').classList.add('show');
|
||||
|
||||
fetch(`${API}/restore/repo`, {
|
||||
@@ -588,6 +593,9 @@ function openRestoreRepo(owner, repoName, size) {
|
||||
` cp -r ${d.extracted_to}/* /var/lib/docker/volumes/yccsckck4g004gosccwc4kg4_gitea-data/_data/git/repositories/${owner}/\n` +
|
||||
` # Reinicie o Gitea\n` +
|
||||
` docker start <gitea-container>`;
|
||||
|
||||
document.getElementById('modal-download').href = `/api/download/${repoName}`;
|
||||
document.getElementById('modal-download').style.display = 'inline-block';
|
||||
} else {
|
||||
document.getElementById('restore-instructions').value = `Erro: ${d.error}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user