From 10f347ea0c087bfcbad5000a9ea7910b75b06421 Mon Sep 17 00:00:00 2001 From: Nicholas Orlowsky Date: Thu, 10 Nov 2022 14:12:43 -0600 Subject: [PATCH] Added basic accounts system and integration with new api calls --- .idea/workspace.xml | 47 ++++++++++++++-------- src/App.css | 34 ++++++++++++++++ src/index.tsx | 96 +++++++++++++++++++++++++++++++++++++------- src/nws-api/calls.ts | 19 ++++++++- src/nws-api/types.ts | 38 ++++++++++++++++-- 5 files changed, 199 insertions(+), 35 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 67a2c88..2e7f84e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,7 +1,23 @@ - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + @@ -67,6 +81,7 @@ + diff --git a/src/App.css b/src/App.css index c98933c..8c13da2 100644 --- a/src/App.css +++ b/src/App.css @@ -4,6 +4,40 @@ flex-direction: column; } +input { + border-radius: 10px; + border-color: #000; + border-width: 1px; + border-style: solid; + + padding: 3px; + + +} + +button { + border-radius: 10px; + border-width: 0px; + + background-color: cornflowerblue; + color: white; + + margin-top: 10px; + margin-bottom: 10px; + padding: 3px +} + +p { + margin: 0 !important; +} + +.error-banner { + background-color: #f08080; + border-radius: 10px; + padding: 3px; + height: max-content; +} + .low-severity { background-color: #98fb98 } diff --git a/src/index.tsx b/src/index.tsx index ddfea07..1edbc1a 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -10,26 +10,57 @@ import "./index.css"; import 'bootstrap/dist/css/bootstrap.min.css'; import UptimeCard from "./components/UptimeCard"; import Footer from "./components/Footer"; -import {Nav, Navbar, NavbarBrand} from "react-bootstrap"; +import {Nav, Navbar, NavbarBrand, NavDropdown} from "react-bootstrap"; import NWSLogo from "./static/images/NWS_Logo.png"; import Blogs from "./components/Blogs"; +import NotFoundPage from "./components/NotFoundPage"; +import LoginPage from "./components/LoginPage"; +import RegisterPage from "./components/RegisterPage"; +import VerifyPage from "./components/VerifyPage"; +import DashboardPage from "./components/DashboardPage"; +import CreateCruisePage from "./components/CreateCruisePage"; function Layout (props: {children: any}) { return (
- - - nws-logo - - - Home - - - Status - - - Blog - + +
+ + nws-logo + + + Home + + + Status + +
+ {/**/} + {/* Blog*/} + {/**/} +
+ { localStorage.getItem("session_key") === null && + ( + + Login + + + ) + } + { localStorage.getItem("session_key") === null || + ( + + + Dashboard + +
+ {localStorage.removeItem("session_key")}}> + Logout + +
+ ) + } +
{props.children}