Actualizar frontend/src/components/ConfigModal.jsx

This commit is contained in:
2026-09-19 11:36:00 -05:00
parent fd0d9549cf
commit bd864dbd34

View File

@@ -1,5 +1,6 @@
import { useState, useEffect, useRef } from "react"; import { useState, useEffect, useRef } from "react";
import { api } from "../lib/api"; import { api } from "../lib/api";
import Plantillas from "../pages/Plantillas";
// Desplegable con búsqueda (estilo Claude). // Desplegable con búsqueda (estilo Claude).
function ProgramaSelect({ valor, opciones = [], onSelect }) { function ProgramaSelect({ valor, opciones = [], onSelect }) {
@@ -870,9 +871,16 @@ export default function ConfigModal({ onClose }) {
<button onClick={() => setSeccion("leyendas")} <button onClick={() => setSeccion("leyendas")}
style={{ width: "100%", textAlign: "left", padding: "10px 12px", borderRadius: 8, style={{ width: "100%", textAlign: "left", padding: "10px 12px", borderRadius: 8,
border: "none", cursor: "pointer", fontSize: 14, fontWeight: 600, whiteSpace: "nowrap", border: "none", cursor: "pointer", fontSize: 14, fontWeight: 600, whiteSpace: "nowrap",
marginBottom: 4,
background: seccion === "leyendas" ? "#e2e8f0" : "transparent", color: "#1e293b" }}> background: seccion === "leyendas" ? "#e2e8f0" : "transparent", color: "#1e293b" }}>
Leyenda Leyenda
</button> </button>
<button onClick={() => setSeccion("plantillas")}
style={{ width: "100%", textAlign: "left", padding: "10px 12px", borderRadius: 8,
border: "none", cursor: "pointer", fontSize: 14, fontWeight: 600, whiteSpace: "nowrap",
background: seccion === "plantillas" ? "#e2e8f0" : "transparent", color: "#1e293b" }}>
Plantillas
</button>
</div> </div>
{/* Contenido */} {/* Contenido */}
<div style={{ flex: 1, display: "flex", flexDirection: "column" }}> <div style={{ flex: 1, display: "flex", flexDirection: "column" }}>
@@ -882,13 +890,18 @@ export default function ConfigModal({ onClose }) {
{seccion === "leyenda" ? "Leyenda de Anuncios" {seccion === "leyenda" ? "Leyenda de Anuncios"
: seccion === "programas" ? "Programas" : seccion === "programas" ? "Programas"
: seccion === "leyendas" ? "Leyenda" : seccion === "leyendas" ? "Leyenda"
: seccion === "plantillas" ? "Plantillas"
: "Sedes de Anuncios"} : "Sedes de Anuncios"}
</div> </div>
<button onClick={onClose} <button onClick={onClose}
style={{ background: "transparent", border: "none", fontSize: 24, cursor: "pointer", color: "#64748b" }}>×</button> style={{ background: "transparent", border: "none", fontSize: 24, cursor: "pointer", color: "#64748b" }}>×</button>
</div> </div>
{seccion === "leyendas" ? ( {seccion === "plantillas" ? (
<div style={{ flex: 1, overflow: "auto", padding: "16px 22px 24px" }}>
<Plantillas ocultarTitulo />
</div>
) : seccion === "leyendas" ? (
<LeyendaCampanias /> <LeyendaCampanias />
) : seccion === "sedes" ? ( ) : seccion === "sedes" ? (
<SedesAnuncios /> <SedesAnuncios />