From 1bc307d5997b2e868e980fd9bb7cba91b1cd9684 Mon Sep 17 00:00:00 2001 From: Lucas Santana Date: Thu, 6 Feb 2025 21:41:08 -0300 Subject: [PATCH] =?UTF-8?q?style:=20padroniza=20visual=20do=20editor=20de?= =?UTF-8?q?=20reda=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Alinha estilo com StoryPage e CreateStoryPage - Adiciona suporte a texto adaptativo - Melhora feedback visual e estados interativos - Implementa loading states animados --- .../student-dashboard/essays/EssayPage.tsx | 306 +++++++++++------- 1 file changed, 191 insertions(+), 115 deletions(-) diff --git a/src/pages/student-dashboard/essays/EssayPage.tsx b/src/pages/student-dashboard/essays/EssayPage.tsx index f1faa1d..e4abe03 100644 --- a/src/pages/student-dashboard/essays/EssayPage.tsx +++ b/src/pages/student-dashboard/essays/EssayPage.tsx @@ -17,6 +17,11 @@ import { AlertDialogHeader, AlertDialogTitle, } from "@/components/ui/alert-dialog"; +import { useSession } from '@/hooks/useSession'; +import { useUppercasePreference } from '@/hooks/useUppercasePreference'; +import { AdaptiveText, AdaptiveTitle, AdaptiveParagraph } from '@/components/ui/adaptive-text'; +import { TextCaseToggle } from '@/components/ui/text-case-toggle'; +import { cn } from '@/lib/utils'; interface Essay { id: string; @@ -48,6 +53,8 @@ export function EssayPage() { const [saving, setSaving] = useState(false); const [wordCount, setWordCount] = useState(0); const [showDeleteDialog, setShowDeleteDialog] = useState(false); + const { session } = useSession(); + const { isUpperCase, toggleUppercase, isLoading: isUppercaseLoading } = useUppercasePreference(session?.user?.id); useEffect(() => { if (id) { @@ -157,136 +164,205 @@ export function EssayPage() { return (
-
-
- -
- setEssay({ ...essay, title: e.target.value })} - className="text-2xl font-bold border-none focus:border-none" - placeholder="Título da redação" - /> -
- {essay.essay_type.title} - - {essay.essay_genre.title} - - - {essay.status === 'draft' ? 'Rascunho' : 'Enviada'} - -
-
-
-
- - {essay.status === 'draft' && ( - <> - - - - )} -
+
+ +
-
-
-