feat: Add Dockerfile and initial Docker setup files

This commit is contained in:
komkida91
2026-01-31 16:04:55 +01:00
parent 70c533e755
commit 59812e547e
31 changed files with 7720 additions and 1776 deletions

View File

@@ -1,36 +1,48 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Admin - Demo</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
background: #f5f5f5;
padding: 20px;
}
.header {
background: white;
padding: 20px;
border-radius: 5px;
margin-bottom: 20px;
}
table {
width: 100%;
background: white;
border-collapse: collapse;
margin-bottom: 20px;
}
th, td {
th,
td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #ddd;
}
th {
background: #667eea;
color: white;
}
.btn {
padding: 5px 15px;
background: #4caf50;
@@ -41,11 +53,12 @@
}
</style>
</head>
<body>
<div class="header">
<h1>🔧 Panel Admin</h1>
</div>
<h2>Solicitudes Pendientes</h2>
<table>
<tr>
@@ -67,10 +80,12 @@
</tr>
{% endfor %}
{% if not requests %}
<tr><td colspan="5">No hay solicitudes pendientes</td></tr>
<tr>
<td colspan="5">No hay solicitudes pendientes</td>
</tr>
{% endif %}
</table>
<h2>👥 Usuarios Registrados</h2>
<table>
<tr>
@@ -104,10 +119,12 @@
</tr>
{% endfor %}
{% if not users %}
<tr><td colspan="9">No hay usuarios registrados</td></tr>
<tr>
<td colspan="9">No hay usuarios registrados</td>
</tr>
{% endif %}
</table>
<h2>🌐 Todos los Sitios</h2>
<table>
<tr>
@@ -131,48 +148,50 @@
</tr>
{% endfor %}
</table>
<style>
.btn-danger {
background: #d63638;
color: white;
}
.btn-danger:hover {
background: #b32d2e;
}
</style>
<script>
function approve(requestId) {
if (confirm('¿Aprobar este sitio?')) {
fetch(`/admin/approve/${requestId}`, {method: 'POST'})
.then(r => r.json())
.then(data => {
if (data.success) {
alert('✅ Sitio aprobado');
location.reload();
}
});
fetch(`/admin/approve/${requestId}`, { method: 'POST' })
.then(r => r.json())
.then(data => {
if (data.success) {
alert('✅ Sitio aprobado');
location.reload();
}
});
}
}
function deleteUser(userId, email) {
if (confirm(`⚠️ ¿Eliminar usuario ${userId} (${email})?\n\nEsto eliminará TODOS sus datos:\n- Sitios\n- Menús\n- Widgets\n- Media\n- Solicitudes\n\nEsta acción NO se puede deshacer.`)) {
fetch(`/admin/users/delete/${userId}`, {method: 'POST'})
.then(r => r.json())
.then(data => {
if (data.success) {
alert('✅ Usuario eliminado exitosamente');
location.reload();
} else {
alert('❌ Error: ' + (data.error || 'Error al eliminar'));
}
})
.catch(err => {
alert('❌ Error: ' + err);
});
fetch(`/admin/users/delete/${userId}`, { method: 'POST' })
.then(r => r.json())
.then(data => {
if (data.success) {
alert('✅ Usuario eliminado exitosamente');
location.reload();
} else {
alert('❌ Error: ' + (data.error || 'Error al eliminar'));
}
})
.catch(err => {
alert('❌ Error: ' + err);
});
}
}
</script>
</body>
</html>
</html>