feat: UI/UX overhaul — shared layout, SSE live feed, responsive nav, approval drawer
- admin/Layout.php: nueva clase compartida con topbar, nav agrupado y hamburger móvil - assets/app.css: CSS centralizado (~130 líneas), elimina ~2000 líneas duplicadas - DashboardController: 11 vistas refactorizadas con Layout; tarjetas de stats clicables; drawer de aprobación rápida desde el dashboard; Live Feed reemplaza polling 3s por SSE; bot-config con preview WhatsApp en tiempo real; chat con back-button móvil y textarea auto-resize - public/index.php: rutas SSE (/admin/webhook/stream/sse) y pending-list (/admin/pending-list) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
daf1947f13
commit
ef6e9c1f70
+5
-2
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
require_once __DIR__ . '/../config/env.php';
|
||||
require_once __DIR__ . '/../config/db.php';
|
||||
require_once __DIR__ . '/../services/Settings.php';
|
||||
require_once __DIR__ . '/../admin/Layout.php';
|
||||
|
||||
// Merge DB settings over .env defaults (so env() always returns the latest)
|
||||
(function () {
|
||||
@@ -86,8 +87,9 @@ $routes = [
|
||||
// ─── Dashboard protegido ─────────────────────────────────────────────────
|
||||
['GET', '/admin/dashboard', fn() => DashboardController::index()],
|
||||
['GET', '/admin/live', fn() => DashboardController::live()],
|
||||
['GET', '/admin/webhook/stream', fn() => DashboardController::stream()],
|
||||
['GET', '/admin/webhook/raw', fn() => DashboardController::getRaw()],
|
||||
['GET', '/admin/webhook/stream/sse', fn() => DashboardController::streamSse()],
|
||||
['GET', '/admin/webhook/stream', fn() => DashboardController::stream()],
|
||||
['GET', '/admin/webhook/raw', fn() => DashboardController::getRaw()],
|
||||
['GET', '/admin/chat', fn() => DashboardController::chat()],
|
||||
['GET', '/admin/chat/conversations', fn() => DashboardController::chatConversations()],
|
||||
['GET', '/admin/chat/messages', fn() => DashboardController::chatMessages()],
|
||||
@@ -262,6 +264,7 @@ $routes = [
|
||||
['GET', '/admin/process-queue', fn() => DashboardController::processQueue()],
|
||||
|
||||
// ─── Admin: listar pendientes de aprobación ─────────────────────────────
|
||||
['GET', '/admin/pending-list', fn() => DashboardController::pendingList()],
|
||||
['GET', '/admin/pending', fn() => DashboardController::pending()],
|
||||
|
||||
// ─── Admin: aprobar pendiente ───────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user