diff --git a/webui/package.json b/webui/package.json index ea7858f..08070c4 100644 --- a/webui/package.json +++ b/webui/package.json @@ -13,7 +13,8 @@ }, "devDependencies": { "@types/react": "^16.8.1", - "@types/react-redux": "^6.0.0" + "@types/react-redux": "^6.0.0", + "@types/reactstrap": "^7.0.2" }, "scripts": { "start": "react-scripts start", diff --git a/webui/src/App.css b/webui/src/App.css index 92f956e..cc106c7 100755 --- a/webui/src/App.css +++ b/webui/src/App.css @@ -1,32 +1,7 @@ -.App { - text-align: center; +.nav-tabs .nav-item { + cursor: pointer; } -.App-logo { - animation: App-logo-spin infinite 20s linear; - height: 40vmin; -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} +button { + cursor: pointer; +} \ No newline at end of file diff --git a/webui/src/Components/LoginForm.jsx b/webui/src/Components/LoginForm.jsx index a416178..80467f0 100644 --- a/webui/src/Components/LoginForm.jsx +++ b/webui/src/Components/LoginForm.jsx @@ -1,31 +1,122 @@ -import React from "react"; +import React, {useState} from "react"; import {connect} from "react-redux"; -import {Card, CardBody, CardHeader, CardTitle, Col, Form, FormGroup, Input, Label} from "reactstrap"; +import { + Button, + Card, + CardBody, + CardHeader, + Col, + Form, + FormGroup, + Input, + Label, + NavItem, + NavLink, + CardFooter, + Nav, + TabPane +} from "reactstrap"; +import TabContent from "reactstrap/es/TabContent"; function LoginForm(props) { - + const [tab, setTab] = useState(1); + const [loginUser, setLoginUser] = useState(""); + const [loginPass, setLoginPass] = useState(""); + const [regUser, setRegUser] = useState(""); + const [regPass1, setRegPass1] = useState(""); + const [regPass2, setRegPass2] = useState(""); return ( - - - Innlogging - + + Tilgangskontroll -
- - - - - - - - - - - - -
+ + + +
+ + + + setLoginUser(e.target.value)} + /> + + + + + + setLoginPass(e.target.value)} + /> + + +
+
+ +
+ + + + setRegUser(e.target.value)} + /> + + + + + + setRegPass1(e.target.value)} + /> + + + + + + setRegPass2(e.target.value)} + /> + + +
+
+
+ + {tab === 1 && } + {tab === 2 && ( + <> + + {" "} + + + )} +
); }