+ {" "}
+ {/* Added mt-16 to push content down from back button */}
-
-
Письмо отправлено!
-
+
Письмо отправлено!
+
Мы отправили инструкции по восстановлению пароля на адрес{" "}
{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}
-
-
+ {/* 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
-
history.push("/exercise/1")}
- className="bg-gradient-to-r from-[#2BACBE] via-blue-500 to-indigo-600 text-white px-4 sm:px-6 py-3 rounded-2xl font-bold hover:shadow-xl transition-all duration-300 transform hover:scale-105 backdrop-blur-sm text-sm sm:text-base"
+ className="bg-white text-[#2BACBE] px-4 sm:px-6 py-3 rounded-2xl font-bold hover:shadow-xl transition-all duration-300 transform hover:scale-105 backdrop-blur-sm text-sm sm:text-base"
>
Продолжить
- {/* Quick Stats */}
-
+ {/* Quick Stats (Total Exercises & Total Courses) */}
+
-
24
-
Упражнений
+
{totalExercises}
+
Всего упражнений
-
-
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 */}
+
+

+
+
Реабилитация
+
+
Восстановление после травмы
-
Добро пожаловать!
-
Войдите в свой аккаунт
- {/* Login Form */}
+ {/* Login/Register Form Container */}