diff --git a/react-app/src/components/AnalyticsPage.css b/react-app/src/components/AnalyticsPage.css index 0031b1a..c95bfdc 100644 --- a/react-app/src/components/AnalyticsPage.css +++ b/react-app/src/components/AnalyticsPage.css @@ -1,13 +1,18 @@ +/* Общие стили для страницы */ body { background-color: #000; color: #fff; font-family: Arial, sans-serif; + margin: 0; + padding: 0; height: 100vh; display: flex; justify-content: center; - align-items: center; + align-items: flex-start; /* Выравнивание по верхнему краю */ + overflow-y: auto; } +/* Контейнер с аналитикой */ .analytics-container { background-color: #1a1a1a; border-radius: 15px; @@ -15,35 +20,44 @@ body { box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2); max-width: 900px; width: 100%; + overflow-y: auto; + margin-top: 20px; /* Добавляем отступ сверху, чтобы контент не прижимался к верхнему краю */ } +/* Секция с контентом */ .analytics-content { display: flex; flex-direction: column; gap: 20px; } +/* Секция графиков */ .graph-section, .metrics-section, .visualization-section { background-color: #2a2a2a; border-radius: 10px; padding: 20px; } +/* Названия секций */ .section-title { margin-bottom: 15px; color: #ccc; } -.graph-placeholder, .visualization-placeholder { - background-color: #333; - color: #ccc; - height: 200px; +/* Контейнер для графиков */ +.graph-container { display: flex; - justify-content: center; - align-items: center; - border-radius: 10px; + flex-wrap: wrap; + gap: 20px; } +/* Каждый график */ +.graph { + flex: 1; + min-width: 300px; +} + +/* Таблица метрик */ .metrics-table { width: 100%; border-collapse: collapse; @@ -51,17 +65,32 @@ body { color: #fff; } +/* Стили для ячеек таблицы */ .metrics-table th, .metrics-table td { border: 1px solid #555; padding: 10px; text-align: center; } +/* Заголовки таблицы */ .metrics-table th { background-color: #444; color: #fff; } +/* Строки таблицы */ .metrics-table tr:nth-child(even) { background-color: #333; } + +/* Визуализация */ +.visualization-placeholder { + background-color: #333; + border-radius: 10px; + height: 200px; + text-align: center; + color: #ccc; + display: flex; + justify-content: center; + align-items: center; +} diff --git a/react-app/src/components/AnalyticsPage.js b/react-app/src/components/AnalyticsPage.js index e9cce10..0415cf6 100644 --- a/react-app/src/components/AnalyticsPage.js +++ b/react-app/src/components/AnalyticsPage.js @@ -5,19 +5,63 @@ import './AnalyticsPage.css'; function AnalyticsPage() { const metricsData = Array.from({ length: 10 }, (_, epoch) => ({ epoch: epoch + 1, - accuracy: (Math.random() * 20 + 80).toFixed(2), - loss: (Math.random() * 0.5 + 0.5).toFixed(2), + accuracy: Math.random() * 20 + 80, + loss: Math.random() * 0.5 + 0.5, })); return (

Аналитика и результаты обучения

+ {/* Графики */}

Графики метрик

-
Здесь будут графики (accuracy, loss)
+
+
+
Точность (Accuracy)
+ {metricsData.map((data, index) => ( +
+ +
+
+ {data.accuracy.toFixed(2)}% +
+
+
+ ))} +
+ +
+
Потери (Loss)
+ {metricsData.map((data, index) => ( +
+ +
+
+ {data.loss.toFixed(2)} +
+
+
+ ))} +
+
+ {/* Таблица метрик */}

Таблица метрик

@@ -32,14 +76,15 @@ function AnalyticsPage() { {metricsData.map((row, index) => ( - - + + ))}
{row.epoch}{row.accuracy}%{row.loss}{row.accuracy.toFixed(2)}%{row.loss.toFixed(2)}
+ {/* Визуализация */}

Визуализация процесса обучения

Здесь будет визуализация (например, конфигурация модели)
diff --git a/react-app/src/components/UserSettings.css b/react-app/src/components/UserSettings.css new file mode 100644 index 0000000..b0d4991 --- /dev/null +++ b/react-app/src/components/UserSettings.css @@ -0,0 +1,87 @@ +/* Общие стили для страницы */ +body { + background-color: #000; + color: #fff; + font-family: Arial, sans-serif; + margin: 0; + padding: 0; + height: 100vh; + display: flex; + justify-content: center; + align-items: flex-start; /* Выравнивание по верхнему краю */ + overflow-y: auto; +} + +/* Контейнер с настройками пользователя */ +.user-settings-container { + background-color: #1a1a1a; + border-radius: 15px; + padding: 30px; + box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2); + max-width: 900px; + width: 100%; + overflow-y: auto; + margin-top: 20px; /* Отступ сверху */ +} + +/* Секция с контентом */ +.user-settings-content { + display: flex; + flex-direction: column; + gap: 20px; +} + +/* Секция настройки профиля */ +.profile-settings-section, .notification-settings-section { + background-color: #2a2a2a; + border-radius: 10px; + padding: 20px; +} + +/* Названия секций */ +.section-title { + margin-bottom: 15px; + color: #ccc; +} + +/* Форма для ввода данных */ +.form-group label { + font-weight: 500; + margin-bottom: 10px; + display: block; +} + +/* Стили для инпутов */ +.form-control { + background-color: #333; + border: 1px solid #444; + color: #fff; + padding: 10px; + border-radius: 5px; +} + +.form-control:focus { + border-color: #2d93f2; + box-shadow: 0 0 5px rgba(45, 147, 242, 0.5); +} + +/* Кнопка сохранения */ +.btn-success { + background-color: #28a745; + border-color: #28a745; + padding: 10px 20px; + font-size: 16px; +} + +.btn-success:hover { + background-color: #218838; + border-color: #1e7e34; +} + +/* Секция для переключателя уведомлений */ +.notification-toggle { + display: flex; + align-items: center; + gap: 10px; + color: #ccc; +} diff --git a/react-app/src/components/UserSettings.js b/react-app/src/components/UserSettings.js index 27ac61e..56dfa6c 100644 --- a/react-app/src/components/UserSettings.js +++ b/react-app/src/components/UserSettings.js @@ -1,13 +1,77 @@ -import React from 'react'; +import React, { useState } from 'react'; +import 'bootstrap/dist/css/bootstrap.min.css'; +import './UserSettings.css'; function UserSettings() { - return ( -
-

Настройки профиля

- - -
- ); + const [password, setPassword] = useState(''); + const [notifications, setNotifications] = useState(true); + + const handlePasswordChange = (e) => { + setPassword(e.target.value); + }; + + const handleNotificationsChange = () => { + setNotifications(!notifications); + }; + + const handleSubmit = (e) => { + e.preventDefault(); + // Логика отправки данных (например, изменение пароля, настройка уведомлений) + console.log("Изменения сохранены!"); + }; + + return ( +
+

Настройки пользователя

+
+ {/* Секция настройки профиля */} +
+

Настройки профиля

+
+
+ + +
+ +
+ + +
+ + +
+
+ + {/* Секция настройки уведомлений */} +
+

Настройки уведомлений

+
+ + +
+
+
+
+ ); } export default UserSettings;