From d4b216b0b6437688f5ebc3815626dde658c3f5b2 Mon Sep 17 00:00:00 2001 From: Sidney Gomes Date: Sat, 25 Jul 2026 08:50:58 -0300 Subject: [PATCH] fix campos CVV validade e melhoria carrosel aulas --- src/App.tsx | 69 ++++++++++++++++++-------- src/components/PaymentCheckoutCard.tsx | 4 +- src/index.css | 22 ++++++++ 3 files changed, 74 insertions(+), 21 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 955bcfb..fc6f9d4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import React, { useState, useEffect, useRef, useCallback } from 'react'; import { Play, Shield, User, GraduationCap, ArrowRight, Lock, Mail, Plus, CheckCircle, ChevronRight, HelpCircle, Film, Laptop, Eye, EyeOff @@ -30,6 +30,7 @@ export default function App() { const [unlockingCourse, setUnlockingCourse] = useState(null); const [expandedCourseId, setExpandedCourseId] = useState(null); const [selectedLessonId, setSelectedLessonId] = useState(null); + const lessonShelfRefs = useRef>({}); // Authentication forms const [isRegister, setIsRegister] = useState(false); @@ -253,6 +254,13 @@ export default function App() { setExpandedCourseId(null); } else { setExpandedCourseId(courseId); + // Smooth scroll to lesson shelf after brief render delay + setTimeout(() => { + const el = lessonShelfRefs.current[courseId]; + if (el) { + el.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); + } + }, 80); } }; @@ -333,24 +341,40 @@ export default function App() { {/* Expanded Lessons Shelf */} {expandedCourse && expandedCourse.lessons && expandedCourse.lessons.length > 0 && ( -
-
+
{ lessonShelfRefs.current[expandedCourse.id] = el; }} + className="lesson-shelf-enter bg-[#141414]/95 border border-white/5 rounded-2xl p-5 space-y-4 shadow-2xl relative overflow-hidden" + > + {/* Red accent left bar */} +
-
-
-

Aulas de:

-

{expandedCourse.title}

+ {/* Header: course thumbnail + title + close */} +
+
+ {/* Course miniature */} + {expandedCourse.title} +
+

Aulas do Curso

+

{expandedCourse.title}

+

{expandedCourse.lessons.length} aulas disponíveis

+
-
+ {/* Lessons carousel - portrait cards */} +
{expandedCourse.lessons.map(lesson => (
-
+ {/* Portrait thumbnail */} +
{lesson.thumbnailUrl ? ( {lesson.title} ) : ( -
- AULA {lesson.order} - {lesson.title} +
+ Aula {lesson.order} + {lesson.title}
)} + {/* Play overlay */}
@@ -383,13 +409,16 @@ export default function App() {
+ + {/* Order badge */} + + #{lesson.order} +
-
- - Aula {lesson.order} - -

+ {/* Info below */} +
+

{lesson.title}

diff --git a/src/components/PaymentCheckoutCard.tsx b/src/components/PaymentCheckoutCard.tsx index 7e34264..d248f1d 100644 --- a/src/components/PaymentCheckoutCard.tsx +++ b/src/components/PaymentCheckoutCard.tsx @@ -212,7 +212,9 @@ const PaymentCheckoutCard: React.FC = ({ const isSinglePayment = cycle === 'LIFETIME' || itemType === 'course'; const inputClass = - 'w-full glass-input rounded-lg p-3 text-xs text-white focus:outline-none bg-black/40 border border-white/10 focus:border-[#E50914] transition-colors'; + 'w-full rounded-lg p-3 text-xs text-white focus:outline-none border transition-colors ' + + 'bg-zinc-900 border-zinc-700 focus:border-[#E50914] placeholder-zinc-600 ' + + '[color-scheme:dark] [&:-webkit-autofill]:bg-zinc-900 [&:-webkit-autofill]:[webkit-text-fill-color:white]'; // ── SUCCESS SCREEN ───────────────────────────────────────────────────────── if (unlocked) { diff --git a/src/index.css b/src/index.css index 6c853e8..30f623f 100644 --- a/src/index.css +++ b/src/index.css @@ -120,3 +120,25 @@ html, body { .custom-scrollbar::-webkit-scrollbar-track { background: transparent; } .custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(229,9,20,0.35); border-radius: 99px; } .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(229,9,20,0.6); } + +/* ── Lesson shelf animation ── */ +@keyframes lesson-shelf-in { + from { opacity: 0; transform: translateY(-12px); max-height: 0; } + to { opacity: 1; transform: translateY(0); max-height: 600px; } +} +.lesson-shelf-enter { + animation: lesson-shelf-in 0.38s cubic-bezier(0.4, 0, 0.2, 1) forwards; + overflow: hidden; +} + +/* ── Fix autocomplete white background on dark inputs ── */ +input:-webkit-autofill, +input:-webkit-autofill:hover, +input:-webkit-autofill:focus, +input:-webkit-autofill:active { + -webkit-box-shadow: 0 0 0 60px #1a1a1a inset !important; + -webkit-text-fill-color: #fff !important; + caret-color: #fff; + transition: background-color 5000s ease-in-out 0s; +} +