From 110911b457b7527e9fb38ce5e83ee29a33f8c3c7 Mon Sep 17 00:00:00 2001 From: nathan-gt Date: Thu, 14 Mar 2024 22:42:17 -0400 Subject: [PATCH] initial branch commit --- package-lock.json | 106 +++++++++++------- package.json | 2 + src/renderer/components/Dropdown/dropdown.tsx | 29 +++++ src/renderer/components/Header.tsx | 2 + src/renderer/components/Router.tsx | 16 ++- 5 files changed, 109 insertions(+), 46 deletions(-) create mode 100644 src/renderer/components/Dropdown/dropdown.tsx diff --git a/package-lock.json b/package-lock.json index d3b3ae7b..8a8ec987 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "date-fns": "^2.28.0", "electron-log": "^4.4.6", "execa": "^6.1.0", + "fs.promises": "^0.1.2", "lodash": "^4.17.21", "nanoid": "^3.3.1", "node-rtsp-stream": "^0.0.9", @@ -26,6 +27,7 @@ "react": "^17.0.2", "react-battery-gauge": "^1.0.5", "react-dom": "^17.0.2", + "react-dropdown": "^1.11.0", "react-icons": "^4.3.1", "react-redux": "^7.2.6", "react-router": "^6.2.2", @@ -1267,11 +1269,11 @@ } }, "node_modules/@babel/runtime": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz", - "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", "dependencies": { - "regenerator-runtime": "^0.13.4" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" @@ -5541,6 +5543,11 @@ "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", "dev": true }, + "node_modules/classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" + }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -8259,6 +8266,14 @@ "node": ">= 8" } }, + "node_modules/fs.promises": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/fs.promises/-/fs.promises-0.1.2.tgz", + "integrity": "sha512-LNfkXdN6EToumV455EbdJaNxqLmEFqKqNZVIEyI2whtdpIppTsne2fHWgx05s+B2Aif29Lhzdz0AaOXKLvMGsA==", + "engines": { + "node": ">=8.9" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -12647,17 +12662,6 @@ "node": ">=10" } }, - "node_modules/polished/node_modules/@babel/runtime": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.8.tgz", - "integrity": "sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==", - "dependencies": { - "regenerator-runtime": "^0.13.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/postcss": { "version": "8.3.7", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.7.tgz", @@ -13039,6 +13043,18 @@ "react": "17.0.2" } }, + "node_modules/react-dropdown": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/react-dropdown/-/react-dropdown-1.11.0.tgz", + "integrity": "sha512-E2UWetRPxNdIhQahXw6b984ME7WmcgDj9AEAjrtS/oyLCFVo+2qkCfcS06C22JR0Zj+YLnygwv0Ozf6VKKDq7g==", + "dependencies": { + "classnames": "^2.2.3" + }, + "peerDependencies": { + "react": "^0.14.7 || ^15.0.0-0 || ^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^0.14.7 || ^15.0.0-0 || ^16.0.0 || ^17.0.0|| ^18.0.0" + } + }, "node_modules/react-icons": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.3.1.tgz", @@ -13261,9 +13277,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/regexp.prototype.flags": { "version": "1.4.1", @@ -15068,9 +15084,9 @@ } }, "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, "node_modules/tsutils": { @@ -16669,11 +16685,11 @@ } }, "@babel/runtime": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz", - "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", "requires": { - "regenerator-runtime": "^0.13.4" + "regenerator-runtime": "^0.14.0" } }, "@babel/template": { @@ -20042,6 +20058,11 @@ "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", "dev": true }, + "classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" + }, "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -22111,6 +22132,11 @@ "minipass": "^3.0.0" } }, + "fs.promises": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/fs.promises/-/fs.promises-0.1.2.tgz", + "integrity": "sha512-LNfkXdN6EToumV455EbdJaNxqLmEFqKqNZVIEyI2whtdpIppTsne2fHWgx05s+B2Aif29Lhzdz0AaOXKLvMGsA==" + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -25438,16 +25464,6 @@ "integrity": "sha512-Nq5Mbza+Auo7N3sQb1QMFaQiDO+4UexWuSGR7Cjb4Sw11SZIJcrrFtiZ+L0jT9MBsUsxDboHVASbCLbE1rnECg==", "requires": { "@babel/runtime": "^7.16.7" - }, - "dependencies": { - "@babel/runtime": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.8.tgz", - "integrity": "sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==", - "requires": { - "regenerator-runtime": "^0.13.4" - } - } } }, "postcss": { @@ -25723,6 +25739,14 @@ "scheduler": "^0.20.2" } }, + "react-dropdown": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/react-dropdown/-/react-dropdown-1.11.0.tgz", + "integrity": "sha512-E2UWetRPxNdIhQahXw6b984ME7WmcgDj9AEAjrtS/oyLCFVo+2qkCfcS06C22JR0Zj+YLnygwv0Ozf6VKKDq7g==", + "requires": { + "classnames": "^2.2.3" + } + }, "react-icons": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.3.1.tgz", @@ -25898,9 +25922,9 @@ "requires": {} }, "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "regexp.prototype.flags": { "version": "1.4.1", @@ -27233,9 +27257,9 @@ } }, "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, "tsutils": { diff --git a/package.json b/package.json index 30c9c206..7a9740b2 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "date-fns": "^2.28.0", "electron-log": "^4.4.6", "execa": "^6.1.0", + "fs.promises": "^0.1.2", "lodash": "^4.17.21", "nanoid": "^3.3.1", "node-rtsp-stream": "^0.0.9", @@ -65,6 +66,7 @@ "react": "^17.0.2", "react-battery-gauge": "^1.0.5", "react-dom": "^17.0.2", + "react-dropdown": "^1.11.0", "react-icons": "^4.3.1", "react-redux": "^7.2.6", "react-router": "^6.2.2", diff --git a/src/renderer/components/Dropdown/dropdown.tsx b/src/renderer/components/Dropdown/dropdown.tsx new file mode 100644 index 00000000..eefd9c11 --- /dev/null +++ b/src/renderer/components/Dropdown/dropdown.tsx @@ -0,0 +1,29 @@ +import React from 'react'; + + +interface robot { + name: string +} + +function BasicExample() { + + const robot: robot[] = [ + { + name:"rove", + }, + { + name:"markhor", + }, + ] + return ( +
+ +
+ ); +} + +export default BasicExample; \ No newline at end of file diff --git a/src/renderer/components/Header.tsx b/src/renderer/components/Header.tsx index 614562ef..40ae490d 100644 --- a/src/renderer/components/Header.tsx +++ b/src/renderer/components/Header.tsx @@ -7,6 +7,7 @@ import BatteryStatus from './BatteryStatus/BatteryStatus'; import GpioPinsStatus from './GpioPinsStatus/GpioPinsStatus'; import { ExplorationStatus } from './ExplorationStatus/ExplorationStatus'; import { CountdownStatus } from './CountdownStatus/CountdownStatus'; +import BasicExample from './Dropdown/dropdown'; interface NavLinkDefinition { to: string; @@ -50,6 +51,7 @@ export const Header: FC = () => { ))} + diff --git a/src/renderer/components/Router.tsx b/src/renderer/components/Router.tsx index 29964531..bf080aa1 100644 --- a/src/renderer/components/Router.tsx +++ b/src/renderer/components/Router.tsx @@ -9,11 +9,17 @@ export const Router: FC = () => { return ( <> - } /> - } /> - } /> - } /> - } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> );