diff --git a/frontend/src/components/AddLevelButton.jsx b/frontend/src/components/AddLevelButton.jsx index 1d39d4e..555a169 100644 --- a/frontend/src/components/AddLevelButton.jsx +++ b/frontend/src/components/AddLevelButton.jsx @@ -1,13 +1,14 @@ export default function AddLevelButton({ handleAddLevel }) { return ( -
+
+
); } \ No newline at end of file diff --git a/frontend/src/components/BlankCardsCounter.jsx b/frontend/src/components/BlankCardsCounter.jsx index 2cabe8d..3048c02 100644 --- a/frontend/src/components/BlankCardsCounter.jsx +++ b/frontend/src/components/BlankCardsCounter.jsx @@ -1,36 +1,40 @@ export default function BlankCardsCounter({ index, blankCardsCount, handleBlankCardChange }) { return ( -
-
+
-
- Blancas: +
+ + {/* Botones de - y + */} +
- - {blankCardsCount} - + +
+ Blancas + {blankCardsCount} +
+
+ {/* Cartas blancas */} {blankCardsCount > 0 && ( -
+
{Array.from({ length: blankCardsCount }).map((_, i) => (
))}
)} -
); } \ No newline at end of file diff --git a/frontend/src/components/CardEditor.jsx b/frontend/src/components/CardEditor.jsx index f197cf9..efb5ad7 100644 --- a/frontend/src/components/CardEditor.jsx +++ b/frontend/src/components/CardEditor.jsx @@ -1,10 +1,9 @@ export default function CardEditor({ index, level, handleLevelChange, handleRemoveLevel, totalLevels, error }) { return ( -
-
+
- {/* Botón para eliminar */} {totalLevels > 3 && ( )} - {/* Detalles tipo naipe */} - {index + 1} - {index + 1} + {index + 1} + {index + 1} handleLevelChange(index, e.target.value)} - className={`w-4/5 text-center text-2xl font-bold text-slate-700 bg-transparent border-b-2 border-dashed outline-none pb-1 ${ + className={`w-10/12 text-center text-xl font-bold text-slate-700 bg-transparent border-b-2 border-dashed outline-none pb-1 ${ error ? 'border-red-300 focus:border-red-500 placeholder:text-red-200' : 'border-slate-300 focus:border-blue-500' }`} />
- {/* Mensaje de error */} -
+
{error && (

Escribe una etiqueta

)}
-
); } \ No newline at end of file diff --git a/frontend/src/pages/AdvancedMode.jsx b/frontend/src/pages/AdvancedMode.jsx index fb0b57b..1ed2711 100644 --- a/frontend/src/pages/AdvancedMode.jsx +++ b/frontend/src/pages/AdvancedMode.jsx @@ -19,6 +19,9 @@ export default function AdvancedMode() { const [blankCards, setBlankCards] = useState([0, 0]); const [errors, setErrors] = useState({ criterion: false, levels: [] }); + // Estado para controlar la lupa (Zoom) + const [isZoomActive, setIsZoomActive] = useState(true); + // Estados Fase 2 (Franjas) const [baseScale, setBaseScale] = useState({}); const [selectedTerm, setSelectedTerm] = useState(null); @@ -94,31 +97,68 @@ export default function AdvancedMode() { alert("¡Mira la consola! JSON preparado."); }; - // Variables calculadas const scaleKeys = Object.keys(baseScale); const selectedColor = COLORS[scaleKeys.indexOf(selectedTerm) % COLORS.length] || '#2563eb'; + const totalElements = levels.length; + const dynamicScale = totalElements > 6 ? 6.2 / totalElements : 1; + const currentScale = isZoomActive ? Math.max(0.4, dynamicScale) : 1; return (
- {/* --- PASO 1 --- */} + {/* PASO 1 */} {step === 1 && ( -
-

Paso 1: Escala de Referencia (Cartas)

+
+ +
+

+ Paso 1: Escala de Referencia (Mesa) +

+ + {totalElements > 6 && ( + + )} +
+ -
- {levels.map((level, index) => ( -
- 3} /> - {index < levels.length - 1 && } -
- ))} - +
+ +
+ {levels.map((level, index) => ( + + 3} /> + + {index < levels.length - 1 && ( + + )} + + ))} + +
+ +
+
-
+
@@ -126,7 +166,7 @@ export default function AdvancedMode() {
)} - {/* --- PASO 2 --- */} + {/* PASO 2 */} {step === 2 && (