From 489014667cf92ee2efcf75f101683ee45b25c960 Mon Sep 17 00:00:00 2001 From: "MH.Dmitrii" Date: Thu, 24 Sep 2026 16:19:38 +0300 Subject: [PATCH] add password reset component --- frontend/src/App.tsx | 2 + ...Component.css => AuthComponent.module.css} | 6 +- .../auth/components/AuthComponent.tsx | 34 +++--- .../auth/components/ResetComponent.module.css | 93 +++++++++++++++ .../auth/components/ResetComponent.tsx | 47 ++++++++ .../LoginPage.css => layouts/AuthLayout.css} | 2 +- frontend/src/layouts/AuthLayout.tsx | 109 ++++++++++++++++++ frontend/src/pages/ForgotPasswordPage.tsx | 10 ++ frontend/src/pages/LoginPage.tsx | 109 +----------------- 9 files changed, 286 insertions(+), 126 deletions(-) rename frontend/src/features/auth/components/{AuthComponent.css => AuthComponent.module.css} (98%) create mode 100644 frontend/src/features/auth/components/ResetComponent.module.css create mode 100644 frontend/src/features/auth/components/ResetComponent.tsx rename frontend/src/{pages/LoginPage.css => layouts/AuthLayout.css} (97%) create mode 100644 frontend/src/layouts/AuthLayout.tsx create mode 100644 frontend/src/pages/ForgotPasswordPage.tsx diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 2a0a431..411f6b1 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,11 +1,13 @@ import './App.css' import { Route, Routes } from "react-router-dom"; import { LoginPage } from "./pages/LoginPage"; +import { ForgotPasswordPage } from "./pages/ForgotPasswordPage"; function App() { return ( } /> + } /> ); } diff --git a/frontend/src/features/auth/components/AuthComponent.css b/frontend/src/features/auth/components/AuthComponent.module.css similarity index 98% rename from frontend/src/features/auth/components/AuthComponent.css rename to frontend/src/features/auth/components/AuthComponent.module.css index ec8aec5..69f0eb7 100644 --- a/frontend/src/features/auth/components/AuthComponent.css +++ b/frontend/src/features/auth/components/AuthComponent.module.css @@ -1,4 +1,4 @@ -form { +.wrapper_1 form { display: flex; flex-direction: column; background-color: whitesmoke; @@ -31,7 +31,7 @@ form { background-color: whitesmoke; width: 40%; } -input { +.wrapper_1 input { line-height: 40px; border-radius: 16px; border: 1px solid rgba(68, 68, 68, 0.3); @@ -51,7 +51,7 @@ input { padding-top: 10%; padding-bottom: 20px; } -#submit { +.submit { background-color: #087A55; height: 50px; width: 100%; diff --git a/frontend/src/features/auth/components/AuthComponent.tsx b/frontend/src/features/auth/components/AuthComponent.tsx index 4fdb143..b31b76e 100644 --- a/frontend/src/features/auth/components/AuthComponent.tsx +++ b/frontend/src/features/auth/components/AuthComponent.tsx @@ -1,6 +1,6 @@ import { useState, type ReactElement } from "react"; import { Link } from "react-router-dom"; -import "./AuthComponent.css"; +import styles from "./AuthComponent.module.css"; export function Auth():ReactElement { const [email, setEmail] = useState(""); @@ -10,12 +10,12 @@ export function Auth():ReactElement { return ( <> -
+
-

Добро Пожаловать
в The DisExcel Project

-

Войдите в систему, чтобы продолжить работу с вашими процессами

- -
+

Добро Пожаловать
в The DisExcel Project

+

Войдите в систему, чтобы продолжить работу с вашими процессами

+ +
- +
- -
+ +
- +
-
-
+
+
- Забыли пароль? + Забыли пароль?
-
- +
+
+ Вернуться ко входу +
+ +
+ + ); +} diff --git a/frontend/src/pages/LoginPage.css b/frontend/src/layouts/AuthLayout.css similarity index 97% rename from frontend/src/pages/LoginPage.css rename to frontend/src/layouts/AuthLayout.css index 1687a1d..1cfbfec 100644 --- a/frontend/src/pages/LoginPage.css +++ b/frontend/src/layouts/AuthLayout.css @@ -49,7 +49,7 @@ } .main_items { display: flex; - justify-content: space-between; + justify-content: space-between; } .main_item { display: flex; diff --git a/frontend/src/layouts/AuthLayout.tsx b/frontend/src/layouts/AuthLayout.tsx new file mode 100644 index 0000000..55edc2a --- /dev/null +++ b/frontend/src/layouts/AuthLayout.tsx @@ -0,0 +1,109 @@ +import type { ReactNode } from "react"; +import "./AuthLayout.css"; +import logo from "../assets/LOGO.png"; +import img_1 from "../assets/paper.png"; +import img_2 from "../assets/PC.png"; +import img_3 from "../assets/graphics.png"; + +export function AuthLayout({ children }: { children: ReactNode }) { + return ( +
+
+
+
+
+ LOGO +
+
+ The DisExcel +
+
+ Project +
+
+
+
+

+ Избавляем от ручной работы.
+ Переводим процессы из бумаги в Excel,
+ а из Excel - в 1С и отчеты. +

+
+
+
+
+
+
+ {/* 1 */} +
+ img +
Бумага
+
+ Ручная работа, ошибки, потери +
+
+
+ {/* 2 */} +
+ img +
Excel
+
+ Структура, формулы, автоматизация +
+
+
+ {/* 3 */} +
+ img +
1С / Отчеты
+
+ Готовые процессы, аналитика, контроль +
+
+
+
+
+
+
+ {/* 1 */} +
+ + + + + Экономим
время +
+
+ {/* 2 */} +
+ + + + + Снижаем
ошибки +
+
+ {/* 3 */} +
+ + + + + Автоматизируем
процессы +
+
+ {/* 4 */} +
+ + + + + Делаем
бизнес эффективнее +
+
+
+
+ {children} +
+ ); +} diff --git a/frontend/src/pages/ForgotPasswordPage.tsx b/frontend/src/pages/ForgotPasswordPage.tsx new file mode 100644 index 0000000..4a657d1 --- /dev/null +++ b/frontend/src/pages/ForgotPasswordPage.tsx @@ -0,0 +1,10 @@ +import { Reset } from "../features/auth/components/ResetComponent"; +import { AuthLayout } from "../layouts/AuthLayout"; + +export function ForgotPasswordPage() { + return ( + + + + ); +} diff --git a/frontend/src/pages/LoginPage.tsx b/frontend/src/pages/LoginPage.tsx index 73c1ea8..1171ed6 100644 --- a/frontend/src/pages/LoginPage.tsx +++ b/frontend/src/pages/LoginPage.tsx @@ -1,111 +1,10 @@ import { Auth } from "../features/auth/components/AuthComponent"; -import "./LoginPage.css" -import logo from "../assets/LOGO.png" -import img_1 from "../assets/paper.png" -import img_2 from "../assets/PC.png" -import img_3 from "../assets/graphics.png" +import { AuthLayout } from "../layouts/AuthLayout"; export function LoginPage(){ return( - <> -
-
-
-
-
- LOGO -

-

- The DisExcel -
-
- Project -
-

-
-
-

- Избавляем от ручной работы.
- Переводим процессы из бумаги в Excel,
- а из Excel - в 1С и отчеты. -

-
-
-
-
-
-
- {/* 1 */} -
- img -
Бумага
-
- Ручная работа, ошибки, потери -
-
-
- {/* 2 */} -
- img -
Excel
-
- Структура, формулы, автоматизация -
-
-
- {/* 3 */} -
- img -
1С / Отчеты
-
- Готовые процессы, аналитика, контроль -
-
-
-
-
-
-
- {/* 1 */} -
- - - - - Экономим
время -
-
- {/* 2 */} -
- - - - - Снижаем
ошибки -
-
- {/* 3 */} -
- - - - - Автоматизируем
процессы -
-
- {/* 4 */} -
- - - - - Делаем
бизнес эффективнее -
-
-
-
+ -
- + ); -} \ No newline at end of file +}