stub login page
This commit is contained in:
parent
9df08fc14f
commit
6dbd389f02
@ -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} />
|
||||
|
@ -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}
|
||||
|
@ -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
25
src/components/Login.tsx
Normal 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
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user