diff --git a/src/AppRoutes.tsx b/src/AppRoutes.tsx index 6f4534e..c4aba3c 100644 --- a/src/AppRoutes.tsx +++ b/src/AppRoutes.tsx @@ -1,7 +1,6 @@ import { Route } from "react-router-dom" import Home from "./pages/Home" import Login from "./pages/Login" -import Register from "./pages/Register" import Welcome from "./pages/Welcome" import ForgotPassword from "./pages/ForgotPassword" import Courses from "./pages/Courses" @@ -14,7 +13,6 @@ const AppRoutes = () => ( <> - diff --git a/src/components/BottomNavigation.tsx b/src/components/BottomNavigation.tsx index 4384f03..749c8f3 100644 --- a/src/components/BottomNavigation.tsx +++ b/src/components/BottomNavigation.tsx @@ -7,74 +7,80 @@ const BottomNavigation: React.FC = () => { const history = useHistory() const location = useLocation() + // Define SVG icons directly within the component const HomeIcon = ({ active }: { active: boolean }) => ( - - - + + + ) const CoursesIcon = ({ active }: { active: boolean }) => ( - - - + + + ) const ExerciseIcon = ({ active }: { active: boolean }) => ( - - - + + + + ) const SettingsIcon = ({ active }: { active: boolean }) => ( - - - + + + ) const navItems = [ { path: "/home", icon: HomeIcon, label: "Домой" }, { path: "/courses", icon: CoursesIcon, label: "Курсы" }, - { path: "/exercise/1", icon: ExerciseIcon, label: "Заниматься" }, + { path: "/exercise/1", icon: ExerciseIcon, label: "Тренировка" }, { path: "/settings", icon: SettingsIcon, label: "Меню" }, ] @@ -84,7 +90,7 @@ const BottomNavigation: React.FC = () => { } return ( -
+
{navItems.map((item) => { const active = isActive(item.path) @@ -93,16 +99,33 @@ const BottomNavigation: React.FC = () => { ) })} diff --git a/src/components/CircularProgressDisplay.tsx b/src/components/CircularProgressDisplay.tsx new file mode 100644 index 0000000..ee8117a --- /dev/null +++ b/src/components/CircularProgressDisplay.tsx @@ -0,0 +1,77 @@ +import type React from "react" + +interface CircularProgressDisplayProps { + overallProgress: number + totalCourses: number + totalExercises: number +} + +const CircularProgressDisplay: React.FC = ({ + overallProgress, + totalCourses, + totalExercises, +}) => { + const radius = 40 + const circumference = 2 * Math.PI * radius + + // For the "Courses" ring (blue) + const coursesProgress = (totalCourses / 5) * 100 // Assuming max 5 courses for visual representation + const coursesStrokeDashoffset = circumference - (coursesProgress / 100) * circumference + + // For the "Exercises" ring (green) + const exercisesProgress = (totalExercises / 50) * 100 // Assuming max 50 exercises for visual representation + const exercisesStrokeDashoffset = circumference - (exercisesProgress / 100) * circumference + + return ( +
+ + {/* Overall Progress Background Circle */} + + + {/* Courses Ring (Blue) */} + + + {/* Exercises Ring (Green) */} + + +
+
{overallProgress}%
+
Общий прогресс
+
+
+ ) +} + +export default CircularProgressDisplay diff --git a/src/index.css b/src/index.css index 2a68325..e510444 100644 --- a/src/index.css +++ b/src/index.css @@ -10,7 +10,7 @@ --card-foreground: oklch(0.145 0 0); --popover: oklch(1 0 0); --popover-foreground: oklch(0.145 0 0); - --primary: oklch(0.205 0 0); + --primary: oklch(0.63 0.08 220.5); /* #2BACBE */ --primary-foreground: oklch(0.985 0 0); --secondary: oklch(0.97 0 0); --secondary-foreground: oklch(0.205 0 0); @@ -29,7 +29,7 @@ --chart-4: oklch(0.828 0.189 84.429); --chart-5: oklch(0.769 0.188 70.08); --radius: 0.625rem; - --sidebar: oklch(0.985 0 0); + --sidebar: oklch(0.205 0 0); --sidebar-foreground: oklch(0.145 0 0); --sidebar-primary: oklch(0.205 0 0); --sidebar-primary-foreground: oklch(0.985 0 0); @@ -75,6 +75,8 @@ } @theme inline { + /* optional: --font-sans, --font-serif, --font-mono if they are applied in the layout.tsx */ + --color-background: var(--background); --color-foreground: var(--foreground); --color-card: var(--card); @@ -122,240 +124,11 @@ } } -@layer components { - .glass-morphism { - background: rgba(255, 255, 255, 0.25); - backdrop-filter: blur(20px); - -webkit-backdrop-filter: blur(20px); - border: 1px solid rgba(255, 255, 255, 0.3); - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - } - - .glass-morphism-dark { - background: rgba(0, 0, 0, 0.15); - backdrop-filter: blur(20px); - -webkit-backdrop-filter: blur(20px); - border: 1px solid rgba(255, 255, 255, 0.1); - box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); - } - - .scrollable-content { - overflow-y: auto; - overflow-x: hidden; - -webkit-overflow-scrolling: touch; - scrollbar-width: thin; - scrollbar-color: rgba(43, 172, 190, 0.3) transparent; - } -} - -@layer utilities { - .animate-float { - animation: float 6s ease-in-out infinite; - } - - .animate-slide-up { - animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1); - } - - .animate-fade-in { - animation: fadeIn 0.8s ease-out; - } - - .animate-scale-in { - animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1); - } - - .animate-bounce-gentle { - animation: bounceGentle 2s ease-in-out infinite; - } - - .animate-glow { - animation: glow 2s ease-in-out infinite alternate; - } -} - -@keyframes float { - 0%, - 100% { - transform: translateY(0px) rotate(0deg); - } - 33% { - transform: translateY(-10px) rotate(1deg); - } - 66% { - transform: translateY(-5px) rotate(-1deg); - } -} - -@keyframes slideUp { - from { - opacity: 0; - transform: translateY(30px); - } - to { - opacity: 1; - transform: translateY(0); - } -} - -@keyframes fadeIn { - from { - opacity: 0; - } - to { - opacity: 1; - } -} - -@keyframes scaleIn { - from { - opacity: 0; - transform: scale(0.9); - } - to { - opacity: 1; - transform: scale(1); - } -} - -@keyframes bounceGentle { - 0%, - 100% { - transform: translateY(0); - } - 50% { - transform: translateY(-5px); - } -} - -@keyframes glow { - from { - box-shadow: 0 0 20px rgba(43, 172, 190, 0.3); - } - to { - box-shadow: 0 0 30px rgba(43, 172, 190, 0.6); - } - -} - - -/* Enhanced scrollbar */ -::-webkit-scrollbar { - width: 8px; -} - -::-webkit-scrollbar-track { - background: rgba(255, 255, 255, 0.1); - border-radius: 10px; -} - -::-webkit-scrollbar-thumb { - background: linear-gradient(45deg, #2bacbe, #5f5c5c); - border-radius: 10px; - border: 2px solid transparent; - background-clip: content-box; -} - -::-webkit-scrollbar-thumb:hover { - background: linear-gradient(45deg, #2bacbe, #2bacbe); - background-clip: content-box; -} - -/* Smooth transitions for all interactive elements */ -button, -input, -select, -div { - transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); -} - -/* Focus styles for accessibility */ -button:focus, -input:focus, -select:focus { - outline: 2px solid #2bacbe; - outline-offset: 2px; -} - -/* Loading animation */ -.loading-spinner { - border: 3px solid rgba(43, 172, 190, 0.1); - border-top: 3px solid #2bacbe; - border-radius: 50%; - width: 24px; - height: 24px; - animation: spin 1s linear infinite; -} - -@keyframes spin { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } -} - -/* Backdrop blur support */ -@supports (backdrop-filter: blur(20px)) { - .backdrop-blur-2xl { - backdrop-filter: blur(20px); - -webkit-backdrop-filter: blur(20px); - } -} - -@supports not (backdrop-filter: blur(20px)) { - .backdrop-blur-2xl { - background: rgba(255, 255, 255, 0.8); - } -} - -/* Modern gradient backgrounds */ -.gradient-mesh { - background: linear-gradient(45deg, #667eea 0%, #764ba2 100%); - background-size: 400% 400%; - animation: gradientShift 15s ease infinite; -} - -@keyframes gradientShift { - 0% { - background-position: 0% 50%; - } - 50% { - background-position: 100% 50%; - } - 100% { - background-position: 0% 50%; - } -} - -/* Enhanced card hover effects */ -.card-hover { - transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); -} - -.card-hover:hover { - transform: translateY(-4px) scale(1.02); - box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); -} - -/* Improved button styles */ -.btn-primary { - background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); - border: none; - color: white; - font-weight: 700; - padding: 12px 24px; - border-radius: 16px; - transition: all 0.3s ease; - box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); -} - -.btn-primary:hover { - transform: translateY(-2px); - box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4); -} - -.btn-primary:active { - transform: translateY(0); +/* Custom glass-morphism effect */ +.glass-morphism { + background-color: rgba(255, 255, 255, 0.1); /* White with transparency */ + backdrop-filter: blur(10px); /* Blur effect */ + -webkit-backdrop-filter: blur(10px); /* For Safari */ + border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle white border */ + box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); /* Shadow */ } diff --git a/src/pages/Exercise.tsx b/src/pages/Exercise.tsx index 2bbbecc..89d26ba 100644 --- a/src/pages/Exercise.tsx +++ b/src/pages/Exercise.tsx @@ -1,9 +1,8 @@ "use client" - import type React from "react" import { useState, useEffect } from "react" import { useHistory, useParams } from "react-router-dom" -import BottomNavigation from "../components/BottomNavigation" +// Удален импорт BottomNavigation const Exercise: React.FC = () => { const history = useHistory() @@ -15,7 +14,7 @@ const Exercise: React.FC = () => { const [totalSets] = useState(3) useEffect(() => { - let interval: NodeJS.Timeout + let interval: NodeJS.Timeout | undefined if (isPlaying) { interval = setInterval(() => { setCurrentTime((prev) => { @@ -29,7 +28,9 @@ const Exercise: React.FC = () => { }) }, 1000) } - return () => clearInterval(interval) + return () => { + if (interval) clearInterval(interval) + } }, [isPlaying, totalTime, history]) const formatTime = (seconds: number) => { @@ -40,94 +41,122 @@ const Exercise: React.FC = () => { const progress = (currentTime / totalTime) * 100 + // SVG Icons + const BackIcon = () => ( + + + + ) + + const HeartIcon = () => ( + + + + ) + + const PlayIcon = () => ( + + + + ) + + const PauseIcon = () => ( + + + + ) + + const RefreshIcon = () => ( + + + + ) + + const CheckIcon = () => ( + + + + ) + const exerciseSteps = [ { title: "Исходное положение", description: - "Лягте на спину на коврик. Руки вдоль тела, ладони прижаты к полу. Ноги выпрямлены, носки направлены вверх. Поясница плотно прижата к полу.", - icon: "1️⃣", - color: "from-blue-400 to-cyan-500", + "Лягте на спирку на коврик. Руки вдоль тела, ладони прижаты к полу. Ноги выпрямлены, носки направлены вверх. Поясница плотно прижата к полу.", + icon: "1", }, { title: "Задание", description: "Медленно поднимите прямые ноги до угла 90 градусов. Задержитесь на 2 секунды, затем медленно опустите ноги, не касаясь пола. Повторите движение плавно и контролируемо.", - icon: "2️⃣", - color: "from-emerald-400 to-green-500", + icon: "2", }, { title: "Подходы", description: "Выполните 3 подхода по 12 повторений с отдыхом 60 секунд между подходами.", - icon: "3️⃣", - color: "from-purple-400 to-pink-500", + icon: "3", }, { title: "Перерыв", description: "Отдыхайте 60 секунд между подходами. Дышите спокойно и расслабьте мышцы.", - icon: "4️⃣", - color: "from-orange-400 to-red-500", + icon: "4", }, { title: "Динамика и статика", description: "Динамическая фаза: подъем и опускание ног выполняется плавно, 2 секунды вверх, 2 секунды вниз. Статическая фаза: удержание ног в верхней точке на 2 секунды.", - icon: "5️⃣", - color: "from-indigo-400 to-purple-500", + icon: "5", }, ] return ( -
+
{/* Header */} -
-
-
-
- -
-

Подъемы ног лежа

-

Упражнение 1 из 12

-
-
- - - -
+
+
+ +
+

Подъемы ног лежа

+

Упражнение 1 из 12

- - {/* Set Counter */} -
- {Array.from({ length: totalSets }).map((_, index) => ( -
- {index + 1} -
- ))} +
+
+ {/* Set Counter */} +
+ {Array.from({ length: totalSets }).map((_, index) => ( +
+ {index + 1} +
+ ))} +
- {/* Video/Image Section */}
-
+
{ onClick={() => setIsPlaying(!isPlaying)} className="w-20 h-20 bg-white/90 backdrop-blur-xl rounded-full flex items-center justify-center shadow-2xl hover:bg-white transition-all duration-300 transform hover:scale-110 border border-white/50" > - {isPlaying ? "⏸️" : "▶️"} + {isPlaying ? : }
- {/* Live indicators */} {isPlaying && (
@@ -153,47 +181,44 @@ const Exercise: React.FC = () => {
)} - {/* Timer Display */} -
- {formatTime(currentTime)} +
+ {formatTime(currentTime)}
- - {/* Exercise Steps */} + {/* Exercise Steps - Vertical Scroll */}
{exerciseSteps.map((step, index) => (
- {step.icon} + {step.icon}

{step.title}

-

{step.description}

+

{step.description}

))}
- {/* Important Notes */}
-
+
-
- ! +
+ !
-

Важные замечания

-
    +

    Важные замечания

    +
    • • Не отрывайте поясницу от пола
    • • Дышите равномерно, не задерживайте дыхание
    • • При болевых ощущениях немедленно прекратите
    • @@ -203,60 +228,63 @@ const Exercise: React.FC = () => {
- {/* Fixed Timer at Bottom */} -
+
- + Подход {currentSet} из {totalSets}
- + {formatTime(currentTime)} / {formatTime(totalTime)}
- -
+
-
- -
) } diff --git a/src/pages/ForgotPassword.tsx b/src/pages/ForgotPassword.tsx index e2eae84..10fd8f8 100644 --- a/src/pages/ForgotPassword.tsx +++ b/src/pages/ForgotPassword.tsx @@ -1,5 +1,4 @@ "use client" - import type React from "react" import { useState } from "react" import { useHistory } from "react-router-dom" @@ -20,18 +19,22 @@ const ForgotPassword: React.FC = () => { return (
-
- {/* Header */} -
- +
+ {/* Back Button */} + + {/* Header */} +
+ {" "} + {/* Added mt-16 to push content down from back button */}
{
{/* Email Input */}
- +
setEmail(e.target.value)} - className="w-full bg-white/10 backdrop-blur-lg border border-white/20 rounded-2xl px-4 py-3 text-white placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-white/30 focus:border-transparent transition-all" - placeholder="example@mail.com" + className="w-full bg-white rounded-xl px-4 py-3 text-gray-800 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-[#2BACBE] focus:border-transparent transition-all shadow-sm" + placeholder="Электронная почта" required /> {
- {/* Submit Button */} @@ -96,21 +101,16 @@ const ForgotPassword: React.FC = () => {
-
-

Письмо отправлено!

-

+

Письмо отправлено!

+

Мы отправили инструкции по восстановлению пароля на адрес{" "} {email}

-
-

Автоматический переход через 3 секунды...

-
diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 2cfa03d..2c26d0d 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -1,11 +1,10 @@ "use client" - -import type React from "react" import { useEffect, useState } from "react" import { useHistory } from "react-router-dom" import BottomNavigation from "../components/BottomNavigation" +import CircularProgressDisplay from "../components/CircularProgressDisplay" -const Home: React.FC = () => { +export default function Home() { const history = useHistory() const [currentDate, setCurrentDate] = useState("") @@ -21,10 +20,89 @@ const Home: React.FC = () => { }, []) const stats = [ - { value: "12", label: "Дней подряд", icon: "🔥", color: "from-orange-400 to-red-500" }, - { value: "85%", label: "Прогресс", icon: "📈", color: "from-emerald-400 to-green-500" }, - { value: "3", label: "Курса", icon: "📚", color: "from-blue-400 to-cyan-500" }, - { value: "45", label: "Минут", icon: "⏱️", color: "from-purple-400 to-pink-500" }, + { + value: "12", + label: "Дней подряд", + color: "from-orange-400 to-red-500", + svg: ( + + + + + ), + }, + { + value: "85%", + label: "Прогресс", + color: "from-emerald-400 to-green-500", + svg: ( + + + + + ), + }, + { + value: "3", + label: "Курса", + color: "from-blue-400 to-cyan-500", + svg: ( + + + + ), + }, + { + value: "45", + label: "Минут", + color: "from-purple-400 to-pink-500", + svg: ( + + + + + ), + }, ] const courses = [ @@ -48,7 +126,7 @@ const Home: React.FC = () => { }, { id: 3, - name: "Реабилитация плеча", + name: "Реабилитация плеча", progress: 90, color: "from-purple-500 to-pink-600", icon: "💪", @@ -57,120 +135,110 @@ const Home: React.FC = () => { }, ] + // Calculate overall progress, total courses, total exercises + const totalCourses = courses.length + const totalExercises = courses.reduce((sum, course) => sum + course.exercises, 0) + const overallProgress = Math.round(courses.reduce((sum, course) => sum + course.progress, 0) / totalCourses) + return ( -
+
{/* Header */} -
- {/* Background Pattern */} -
-
-
-
-
+
+
+
+

Привет, Александр!

+
+
+

{currentDate}

+
-
-
-
-

Привет, Александр! 👋

-

{currentDate}

-
-
- - - -
-
+ {/* Circular Progress Display */} +
+ +
+
+
+
{totalCourses}
+
Курсов
- - {/* Stats Grid */} -
- {stats.map((stat, index) => ( -
-
-
- {stat.icon} -
-
-
{stat.value}
-
{stat.label}
-
-
-
- ))} +
+
{totalExercises}
+
Упражнений
-
+
{/* Current Exercise */} -
+
-

Текущее упражнение

-
+

Тренировка

{/* Changed from "Текущее упражнение" */} +
Активно
-
-
- 🦵 +
+ {/* Clock icon SVG */} + + + +
-
- +
+
-
-

Подъемы ног лежа

-

Восстановление колена • 3 подхода по 12

- +

Подъемы ног лежа

+

Восстановление колена • 3 подхода по 12

-
+
-
60%
+
60%
-
- {/* Quick Stats */} -
+ {/* Quick Stats (Total Exercises & Total Courses) */} +
-
24
-
Упражнений
+
{totalExercises}
+
Всего упражнений
-
180
-
Минут
-
-
-
7
-
Дней
+
{totalCourses}
+
Всего курсов
@@ -188,7 +256,6 @@ const Home: React.FC = () => {
-
{courses.map((course) => (
{
-
) } - -export default Home diff --git a/src/pages/Login.tsx b/src/pages/Login.tsx index a5a5684..65c74fc 100644 --- a/src/pages/Login.tsx +++ b/src/pages/Login.tsx @@ -3,143 +3,362 @@ import type React from "react" import { useState } from "react" import { useHistory } from "react-router-dom" +import manImage from "../assets/man.svg" // Reverted to original import -const Login: React.FC = () => { +export default function LoginPage() { const history = useHistory() const [email, setEmail] = useState("") const [password, setPassword] = useState("") const [showPassword, setShowPassword] = useState(false) + const [rememberMe, setRememberMe] = useState(false) + const [activeTab, setActiveTab] = useState<"login" | "register">("login") + + // State and handlers for the registration form + const [registerFormData, setRegisterFormData] = useState({ + email: "", // Removed firstName, lastName + password: "", + confirmPassword: "", + }) + const [showRegisterPassword, setShowRegisterPassword] = useState(false) + const [showConfirmRegisterPassword, setShowConfirmRegisterPassword] = useState(false) const handleLogin = (e: React.FormEvent) => { e.preventDefault() // Simulate login + console.log("Logging in with:", { email, password, rememberMe }) history.push("/home") } + const handleRegisterSubmit = (e: React.FormEvent) => { + e.preventDefault() + if (registerFormData.password !== registerFormData.confirmPassword) { + alert("Пароли не совпадают") + return + } + // Simulate registration + console.log("Registering with:", registerFormData) + history.push("/home") + } + + const handleRegisterInputChange = (e: React.ChangeEvent) => { + setRegisterFormData({ + ...registerFormData, + [e.target.name]: e.target.value, + }) + } + return (
-
- {/* Logo */} -
-
- - - - +
+
+ {/* Header Section */} +
+ man +
+

Реабилитация

+
+

Восстановление после травмы

-

Добро пожаловать!

-

Войдите в свой аккаунт

- {/* Login Form */} + {/* Login/Register Form Container */}
-
- {/* Email Input */} -
- -
- setEmail(e.target.value)} - className="w-full bg-white/10 backdrop-blur-lg border border-white/20 rounded-2xl px-4 py-3 text-white placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-white/30 focus:border-transparent transition-all" - placeholder="example@mail.com" - required - /> - - - -
-
+ {/* Tab Buttons Container */} +
+ + +
- {/* Password Input */} -
- -
- setPassword(e.target.value)} - className="w-full bg-white/10 backdrop-blur-lg border border-white/20 rounded-2xl px-4 py-3 text-white placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-white/30 focus:border-transparent transition-all" - placeholder="••••••••" - required - /> + {activeTab === "login" && ( + +

Введите логин и пароль

+ {/* Email Input */} +
+ +
+ setEmail(e.target.value)} + className="w-full bg-white rounded-xl px-4 py-3 text-gray-800 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-[#2BACBE] focus:border-transparent transition-all shadow-sm" + placeholder="Электронная почта" + required + /> + + + +
+
+ {/* Password Input */} +
+ +
+ setPassword(e.target.value)} + className="w-full bg-white rounded-xl px-4 py-3 text-gray-800 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-[#2BACBE] focus:border-transparent transition-all shadow-sm" + placeholder="Пароль" + required + /> + +
+
+ {/* Remember Me & Forgot Password */} +
+
-
- - {/* Forgot Password */} -
+ {/* Login Button */} -
+ + )} - {/* Login Button */} - - - - {/* Register Link */} -
-

- Нет аккаунта?{" "} - +

+
+ {/* Confirm Password */} +
+ +
+ + +
+
+ {/* Register Button */} + + + )} + + {/* Login/Register Link (always visible) */} +
+

+ {activeTab === "login" ? "Нет аккаунта?" : "Уже есть аккаунт?"}{" "} +

@@ -147,5 +366,3 @@ const Login: React.FC = () => {
) } - -export default Login diff --git a/src/pages/Register.tsx b/src/pages/Register.tsx deleted file mode 100644 index 6652797..0000000 --- a/src/pages/Register.tsx +++ /dev/null @@ -1,228 +0,0 @@ -"use client" - -import type React from "react" -import { useState } from "react" -import { useHistory } from "react-router-dom" - -const Register: React.FC = () => { - const history = useHistory() - const [formData, setFormData] = useState({ - firstName: "", - lastName: "", - email: "", - password: "", - confirmPassword: "", - }) - const [showPassword, setShowPassword] = useState(false) - const [showConfirmPassword, setShowConfirmPassword] = useState(false) - - const handleSubmit = (e: React.FormEvent) => { - e.preventDefault() - if (formData.password !== formData.confirmPassword) { - alert("Пароли не совпадают") - return - } - // Simulate registration - history.push("/home") - } - - const handleInputChange = (e: React.ChangeEvent) => { - setFormData({ - ...formData, - [e.target.name]: e.target.value, - }) - } - - return ( -
-
- {/* Header */} -
- - -
- - - - -
-

Регистрация

-

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

-
- - {/* Registration Form */} -
-
- {/* Name Fields */} -
-
- - -
-
- - -
-
- - {/* Email */} -
- - -
- - {/* Password */} -
- -
- - -
-
- - {/* Confirm Password */} -
- -
- - -
-
- - {/* Register Button */} - -
- - {/* Login Link */} -
-

- Уже есть аккаунт?{" "} - -

-
-
-
-
- ) -} - -export default Register diff --git a/src/pages/Welcome.tsx b/src/pages/Welcome.tsx index c151bba..9a24608 100644 --- a/src/pages/Welcome.tsx +++ b/src/pages/Welcome.tsx @@ -1,12 +1,9 @@ "use client" - -import type React from "react" import { useEffect, useState } from "react" import { useHistory } from "react-router-dom" -import manImage from '../assets/man.svg'; -import emblemImage from '../assets/emblem.png'; +import manImage from "../assets/man.svg" // Reverted to original import -const Welcome: React.FC = () => { +export default function Welcome() { const history = useHistory() const [animationPhase, setAnimationPhase] = useState(0) @@ -14,7 +11,7 @@ const Welcome: React.FC = () => { const timer1 = setTimeout(() => setAnimationPhase(1), 500) const timer2 = setTimeout(() => setAnimationPhase(2), 1500) const timer3 = setTimeout(() => setAnimationPhase(3), 2500) - // const timer4 = setTimeout(() => history.push("/login"), 4000) + // const timer4 = setTimeout(() => history.push("/login"), 4000) // Uncomment if you want auto-redirect return () => { clearTimeout(timer1) @@ -26,19 +23,17 @@ const Welcome: React.FC = () => { return (
- - {/* */} - -
{/* Floating particles */}
@@ -47,29 +42,23 @@ const Welcome: React.FC = () => {
- - {/* Main Content */}
- - -
- {/* App Name */}
= 1 ? "opacity-100 translate-y-0" : "opacity-0 translate-y-8" - }`} + className={`transition-all duration-1000 delay-300 ${ + animationPhase >= 1 ? "opacity-100 translate-y-0" : "opacity-0 translate-y-8" + }`} > - - -

Реабилитация

Восстановление через движение

{/* Loading indicator */}
= 1 ? "opacity-100" : "opacity-0"}`} + className={`mt-16 transition-all duration-500 delay-700 ${ + animationPhase >= 1 ? "opacity-100" : "opacity-0" + }`} >
{

Загрузка...

- - - - -
- ) } - -export default Welcome