From 7a85bcd4e0e92ab2f5e1de551286f4e2986e986b Mon Sep 17 00:00:00 2001 From: Eddie Wang Date: Fri, 20 Dec 2019 09:01:28 -0800 Subject: [PATCH] ui stuff --- packages/siaviewnode-client/pages/index.tsx | 55 ++++++++++++----- .../src/components/Dropzone.tsx | 60 +++++++------------ packages/siaviewnode-server/src/main.ts | 3 - 3 files changed, 63 insertions(+), 55 deletions(-) diff --git a/packages/siaviewnode-client/pages/index.tsx b/packages/siaviewnode-client/pages/index.tsx index 8e4865de..71a90248 100644 --- a/packages/siaviewnode-client/pages/index.tsx +++ b/packages/siaviewnode-client/pages/index.tsx @@ -7,9 +7,14 @@ import { Typography, CardActions, Button, - makeStyles + makeStyles, + AppBar, + Tabs, + Tab } from "@material-ui/core" import Dropzone from "../src/components/Dropzone" +import { useState } from "react" +import { TabPanel } from "../src/components/TabPanel" const useStyles = makeStyles({ card: { @@ -30,14 +35,18 @@ const useStyles = makeStyles({ const Index = () => { const classes = useStyles({}) - const bull = + const [value, setValue] = useState(0) + + const handleChange = (event, newValue) => { + setValue(newValue) + } return ( <> - Sia View Node + Sia View Node - + + {isDragActive ? ( +

Drop file here ...

+ ) : ( +

Drag 'n' drop a file here, or click to select a file

+ )}
) diff --git a/packages/siaviewnode-server/src/main.ts b/packages/siaviewnode-server/src/main.ts index e557edf4..1ab2b18d 100644 --- a/packages/siaviewnode-server/src/main.ts +++ b/packages/siaviewnode-server/src/main.ts @@ -64,11 +64,8 @@ export class Server { }) ) this.app.post("/siafile", this.postSiaFile) - this.app.get("/siafile/download", this.downloadSiaFile) } - private async downloadSiaFile(req, res) {} - private async postSiaFile( req: express.Request & any, res: express.Response