From c1a250e7e63f0c2053d003b2477720695e1658b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Wed, 2 Aug 2023 12:06:22 +0200 Subject: [PATCH] feat: adding navigation bar to frontend --- frontend/src/App.tsx | 33 +++++++++++++++---- .../frontend/asset-manifest.json | 6 ++-- src/pyDataService/frontend/index.html | 2 +- .../frontend/static/js/main.35fa39a1.js | 3 ++ ...CENSE.txt => main.35fa39a1.js.LICENSE.txt} | 0 .../frontend/static/js/main.35fa39a1.js.map | 1 + .../frontend/static/js/main.7e1debb9.js | 3 -- .../frontend/static/js/main.7e1debb9.js.map | 1 - 8 files changed, 34 insertions(+), 15 deletions(-) create mode 100644 src/pyDataService/frontend/static/js/main.35fa39a1.js rename src/pyDataService/frontend/static/js/{main.7e1debb9.js.LICENSE.txt => main.35fa39a1.js.LICENSE.txt} (100%) create mode 100644 src/pyDataService/frontend/static/js/main.35fa39a1.js.map delete mode 100644 src/pyDataService/frontend/static/js/main.7e1debb9.js delete mode 100644 src/pyDataService/frontend/static/js/main.7e1debb9.js.map diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index f802c8b..a846218 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,5 +1,5 @@ import { useEffect, useReducer, useState } from 'react'; -import { Form } from 'react-bootstrap'; +import { Navbar, Button, Form, Nav, Offcanvas, Container } from 'react-bootstrap'; import { hostname, port, socket } from './socket'; import { DataServiceComponent, @@ -107,7 +107,10 @@ const reducer = (state: State, action: Action): State => { const App = () => { const [state, dispatch] = useReducer(reducer, null); const [isInstantUpdate, setIsInstantUpdate] = useState(true); - // const [isConnected, setIsConnected] = useState(socket.connected); + const [showSettings, setShowSettings] = useState(false); + + const handleCloseSettings = () => setShowSettings(false); + const handleShowSettings = () => setShowSettings(true); useEffect(() => { // Fetch data from the API when the component mounts @@ -137,11 +140,27 @@ const App = () => { } return ( <> - setIsInstantUpdate(e.target.checked)} - type="switch" - /> + + + My App + + + + + + + Settings + + + setIsInstantUpdate(e.target.checked)} + type="switch" + label="Enable Instant Update" + /> + {/* Add any additional controls you want here */} + +
pyDataService App
\ No newline at end of file +pyDataService App
\ No newline at end of file diff --git a/src/pyDataService/frontend/static/js/main.35fa39a1.js b/src/pyDataService/frontend/static/js/main.35fa39a1.js new file mode 100644 index 0000000..89f25a0 --- /dev/null +++ b/src/pyDataService/frontend/static/js/main.35fa39a1.js @@ -0,0 +1,3 @@ +/*! For license information please see main.35fa39a1.js.LICENSE.txt */ +!function(){var e={694:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t