From 5a80962daecca9c82f15f4e0c7efe93c7dcc97ae Mon Sep 17 00:00:00 2001
From: Lucas Schoenfelder <les17@inf.ufpr.br>
Date: Mon, 8 Jun 2020 17:06:10 -0300
Subject: [PATCH] began work on UploadPage

---
 src/Pages/UploadPage.js | 83 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)
 create mode 100644 src/Pages/UploadPage.js

diff --git a/src/Pages/UploadPage.js b/src/Pages/UploadPage.js
new file mode 100644
index 00000000..56e0fb24
--- /dev/null
+++ b/src/Pages/UploadPage.js
@@ -0,0 +1,83 @@
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
+import React, {useState} from 'react'
+import styled from 'styled-components'
+import Grid from '@material-ui/core/Grid';
+import UploadFileWrapper from '../Components/UploadPageComponents/UploadFileWrapper.js'
+import LearnObjInfo from '../Components/UploadPageComponents/LearnObjInfo.js'
+import Alert from '../Components/Alert.js';
+import Snackbar from '@material-ui/core/Snackbar';
+
+export default function UploadPage (props) {
+    const [object, setObject] = useState()
+    const [userPickedObject, togglePickedObject] = useState(false)
+    const handleChooseObject = (obj) => {
+        setObject(obj)
+        togglePickedObject(true)
+        toggleSnackbar(true)
+    }
+
+    const [snackbarOpen, toggleSnackbar] = useState(false)
+    return (
+        <React.Fragment>
+            <Snackbar open={snackbarOpen} autoHideDuration={1000} onClose={() => {toggleSnackbar(false)}}
+            anchorOrigin = {{ vertical:'top', horizontal:'right' }}
+            >
+                <Alert severity="info" style={{backgroundColor:"#00acc1"}}>
+                    Link salvo com sucesso!
+                </Alert>
+            </Snackbar>
+
+            <Background>
+                <div className="container">
+                    <Grid container spacing={2}>
+                        <Grid item md={4} xs={12}>
+                            <UploadFileWrapper submit={handleChooseObject}/>
+                        </Grid>
+                        <Grid item md={8} xs={12}>
+                            <LearnObjInfo/>
+                        </Grid>
+                    </Grid>
+                </div>
+            </Background>
+        </React.Fragment>
+    )
+}
+
+const Background = styled.div`
+    padding-top : 40px;
+    background-color : #f4f4f4;
+    color : #666;
+
+    .container {
+        padding : 0;
+        margin-right : auto;
+        margin-left : auto;
+
+        @media screen and (min-width: 768px) {
+            width : 750px;
+        }
+        @media screen and (min-width: 992px) {
+            width : 970px;
+        }
+        @media screen and (min-width: 1200px) {
+            width : 1170px;
+        }
+    }
+`
-- 
GitLab