From 07b9a6d261e4a4e4ca908a553b44c806f816b2fb Mon Sep 17 00:00:00 2001 From: dmitriylaukhin Date: Tue, 7 Apr 2026 12:38:46 +0500 Subject: [PATCH] Polish UX: auto-redirect on create, fix design consistency - createModule now redirects to module page after creation - createLesson now redirects to lesson editor after creation - Regenerate Prisma client to fix missing types (category, accessLog, expiresAt) - Rewrite sortable-modules/lessons with Second Brain design tokens (remove amber/slate) - Rewrite lesson-editor toolbar and toggle with design tokens - Fix register page/form: replace amber theme with card-aubade design Co-Authored-By: Claude Sonnet 4.6 --- src/app/(auth)/register/page.tsx | 14 ++- src/app/(auth)/register/register-form.tsx | 60 +++++---- src/app/admin/courses/[courseId]/actions.ts | 4 +- .../[courseId]/modules/[moduleId]/actions.ts | 4 +- .../[courseId]/modules/[moduleId]/page.tsx | 24 ++-- src/components/admin/lesson-editor.tsx | 117 ++++++++++++------ src/components/admin/sortable-lessons.tsx | 104 ++++++++++++---- src/components/admin/sortable-modules.tsx | 104 +++++++++++----- 8 files changed, 304 insertions(+), 127 deletions(-) diff --git a/src/app/(auth)/register/page.tsx b/src/app/(auth)/register/page.tsx index 6df2819..3bdf363 100644 --- a/src/app/(auth)/register/page.tsx +++ b/src/app/(auth)/register/page.tsx @@ -2,13 +2,17 @@ import { RegisterForm } from "./register-form"; export default function RegisterPage() { return ( -
-
+
+
-

Second Brain

-

Создайте аккаунт

+

+ Second Brain +

+

+ Образовательная платформа +

-
+
diff --git a/src/app/(auth)/register/register-form.tsx b/src/app/(auth)/register/register-form.tsx index c64d504..31365ed 100644 --- a/src/app/(auth)/register/register-form.tsx +++ b/src/app/(auth)/register/register-form.tsx @@ -1,12 +1,10 @@ "use client"; import { useState } from "react"; -import { useRouter } from "next/navigation"; import Link from "next/link"; import { signUp } from "@/lib/auth-client"; export function RegisterForm() { - const router = useRouter(); const [name, setName] = useState(""); const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); @@ -14,6 +12,16 @@ export function RegisterForm() { const [loading, setLoading] = useState(false); const [success, setSuccess] = useState(false); + const inputStyle = { + border: "2px solid var(--border)", + background: "var(--background)", + outline: "none", + width: "100%", + padding: "0.5rem 0.75rem", + fontSize: "0.875rem", + fontFamily: "inherit", + } as React.CSSProperties; + async function handleSubmit(e: React.FormEvent) { e.preventDefault(); setError(""); @@ -35,14 +43,11 @@ export function RegisterForm() { return (
✉️
-

- Проверьте почту -

-

- Мы отправили письмо на {email} для подтверждения - аккаунта. +

Проверьте почту

+

+ Мы отправили письмо на {email} для подтверждения аккаунта.

- + Вернуться к входу
@@ -51,8 +56,8 @@ export function RegisterForm() { return (
-
-