diff --git a/package-lock.json b/package-lock.json
index 01203b4..6478421 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -22,6 +22,9 @@
"socket.io": "^4.8.0",
"socket.io-client": "^4.8.0",
"web-vitals": "^2.1.4"
+ },
+ "devDependencies": {
+ "sass": "^1.79.3"
}
},
"node_modules/@adobe/css-tools": {
@@ -10356,6 +10359,13 @@
"url": "https://opencollective.com/immer"
}
},
+ "node_modules/immutable": {
+ "version": "4.3.7",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz",
+ "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==",
+ "devOptional": true,
+ "license": "MIT"
+ },
"node_modules/import-fresh": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
@@ -17053,6 +17063,24 @@
"integrity": "sha512-ZRwKbh/eQ6w9vmTjkuG0Ioi3HBwPFce0O+v//ve+aOq1oeCy7jMV2qzzAlpsNuqpqCBjjriM1lbtZbF/Q8jVyA==",
"license": "CC0-1.0"
},
+ "node_modules/sass": {
+ "version": "1.79.3",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.79.3.tgz",
+ "integrity": "sha512-m7dZxh0W9EZ3cw50Me5GOuYm/tVAJAn91SUnohLRo9cXBixGUOdvmryN+dXpwR831bhoY3Zv7rEFt85PUwTmzA==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "chokidar": "^4.0.0",
+ "immutable": "^4.0.0",
+ "source-map-js": ">=0.6.2 <2.0.0"
+ },
+ "bin": {
+ "sass": "sass.js"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
"node_modules/sass-loader": {
"version": "12.6.0",
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-12.6.0.tgz",
@@ -17091,6 +17119,36 @@
}
}
},
+ "node_modules/sass/node_modules/chokidar": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz",
+ "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "readdirp": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 14.16.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/sass/node_modules/readdirp": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.1.tgz",
+ "integrity": "sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==",
+ "devOptional": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 14.16.0"
+ },
+ "funding": {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
"node_modules/sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
diff --git a/package.json b/package.json
index 4350e13..fb34334 100644
--- a/package.json
+++ b/package.json
@@ -41,5 +41,8 @@
"last 1 firefox version",
"last 1 safari version"
]
+ },
+ "devDependencies": {
+ "sass": "^1.79.3"
}
}
diff --git a/src/App.js b/src/App.js
index 804bd00..40ed20d 100644
--- a/src/App.js
+++ b/src/App.js
@@ -3,19 +3,37 @@ import DeviceGroups from "./pages/DeviceGroups";
import Devices from "./pages/Devices";
import Sidebar from "./Sidebar";
import Dashboard from './pages/Dashboard';
+import UserAccount from './pages/UserAccount'; // Импортируем компонент UserAccount
+import Login from './pages/Login'; // Импортируем страницу логина
+import Connections from './pages/Connections'; // Импортируем страницу подключений
const App = () => {
const [activeTab, setActiveTab] = useState('map'); // По умолчанию активная вкладка "Карта"
+ const [isAuthenticated, setIsAuthenticated] = useState(false); // Статус авторизации
+
+ const handleLogin = () => {
+ setIsAuthenticated(true); // Устанавливаем авторизацию
+ };
+
+ const handleLogout = () => {
+ setIsAuthenticated(false); // Сбрасываем авторизацию
+ };
+
+ if (!isAuthenticated) {
+ return
Подключено по WebSocket: {websocketUrl}
} +{error}
} + +Имя: {userData.username}
+Email: {userData.email}
+Телефон: {userData.phone}
+ +