stub login page

This commit is contained in:
Djeeberjr 2021-09-11 19:32:24 +02:00
parent 9df08fc14f
commit 6dbd389f02
5 changed files with 36 additions and 3 deletions

View File

@ -2,12 +2,14 @@ import React from "react"
import FileBrowser from "./components/FileBrowser"
import { BrowserRouter as Router, Switch, Route, Redirect } from "react-router-dom"
import NotFound from "./components/NotFound"
import Login from "./components/Login"
const App: React.FC = () => {
return (
<div>
<div className="dark:text-gray-300">
<Router>
<Switch>
<Route path="/login" exact component={Login} />
<Route path="/f/" component={FileBrowser}/>
<Redirect from="/" exact to="/f/" />
<Route path="*" component={NotFound} />

View File

@ -38,7 +38,7 @@ const CreateDirButton: React.FC<Props> = (props) => {
}}>
<input
className="bg-transparent dark:text-gray-300 outline-none mx-1 border-b"
className="mx-1 text-input"
type="text"
onChange={(e)=>setName(e.target.value)}
value={name}

View File

@ -111,7 +111,7 @@ const FileBrowser: React.FC<RouteComponentProps> = (props) => {
}
return (
<div className="dark:text-gray-300">
<div>
<FileBrowserContextMenu
onSelect={onContextSelect}
pasteActive={!!srcID}

25
src/components/Login.tsx Normal file
View File

@ -0,0 +1,25 @@
import React from "react"
const Login: React.FC = () => {
return (
<div className="flex justify-center h-screen items-center">
<div>
<form onSubmit={(e)=>{
e.preventDefault()
}} >
<input type="text" placeholder="Username"
className="block my-2 text-input"
required
/>
<input type="password" placeholder="Password"
className="block my-2 text-input"
required
/>
<button className="block my-2 w-full" >Login</button>
</form>
</div>
</div>
)
}
export default Login

View File

@ -1,3 +1,9 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
/* Commonly used classes*/
.text-input{
@apply bg-transparent border-gray-900 dark:border-gray-300 dark:text-gray-300 outline-none border-b
}