From 1a1f66d2a0b704f5e66349880175165af06525e5 Mon Sep 17 00:00:00 2001 From: ajaythapliyal Date: Mon, 13 Mar 2023 09:59:29 +0530 Subject: [PATCH 1/7] adds upload modal --- frontend/src/upload/Upload.tsx | 37 ++++++++++++++++++++++++++++++++++ frontend/tailwind.config.cjs | 3 +++ 2 files changed, 40 insertions(+) create mode 100644 frontend/src/upload/Upload.tsx diff --git a/frontend/src/upload/Upload.tsx b/frontend/src/upload/Upload.tsx new file mode 100644 index 0000000..a2af7c2 --- /dev/null +++ b/frontend/src/upload/Upload.tsx @@ -0,0 +1,37 @@ +import { useState } from 'react'; + +export default function Upload() { + // return null; + + const [docName, setDocName] = useState(''); + return ( +
+
+

Upload New Documentation

+ setDocName(e.target.value)} + > +
+ Name +
+
+ +
+
+ + +
+
+
+ ); +} + +// TODO: sanitize all inputs diff --git a/frontend/tailwind.config.cjs b/frontend/tailwind.config.cjs index 2c44007..ca65c28 100644 --- a/frontend/tailwind.config.cjs +++ b/frontend/tailwind.config.cjs @@ -16,10 +16,13 @@ module.exports = { 'gray-2000': 'rgba(0, 0, 0, 0.5)', 'gray-3000': 'rgba(243, 243, 243, 1)', 'gray-4000': '#949494', + 'gray-5000': '#BBBBBB', 'red-1000': 'rgb(254, 202, 202)', 'red-2000': '#F44336', 'red-3000': '#621B16', 'blue-1000': '#7D54D1', + 'blue-2000': '#002B49', + 'blue-3000': '#4B02E2', }, }, }, From fa31f1ee262a428cd01c9208e9ba02e9eb0789cd Mon Sep 17 00:00:00 2001 From: ajaythapliyal Date: Wed, 15 Mar 2023 08:10:44 +0530 Subject: [PATCH 2/7] modal ui done --- frontend/src/upload/Upload.tsx | 6 +++++- frontend/tailwind.config.cjs | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/upload/Upload.tsx b/frontend/src/upload/Upload.tsx index a2af7c2..f35ce05 100644 --- a/frontend/src/upload/Upload.tsx +++ b/frontend/src/upload/Upload.tsx @@ -14,7 +14,7 @@ export default function Upload() { value={docName} onChange={(e) => setDocName(e.target.value)} > -
+
Name
@@ -23,6 +23,10 @@ export default function Upload() { Choose Files
+
+

Uploaded Files

+

None

+
- + setUploadModalState('ACTIVE')} + > {isDocsListOpen && (
{docs ? ( @@ -224,7 +232,10 @@ export default function Navigation({ setModalState={setApiKeyModalState} isCancellable={isApiKeySet} /> - {/* */} + ); } diff --git a/frontend/src/upload/Upload.tsx b/frontend/src/upload/Upload.tsx index 5fb1a6b..88afa96 100644 --- a/frontend/src/upload/Upload.tsx +++ b/frontend/src/upload/Upload.tsx @@ -1,7 +1,14 @@ import { useCallback, useState } from 'react'; import { useDropzone } from 'react-dropzone'; +import { ActiveState } from '../models/misc'; -export default function Upload() { +export default function Upload({ + modalState, + setModalState, +}: { + modalState: ActiveState; + setModalState: (state: ActiveState) => void; +}) { const [docName, setDocName] = useState(''); const [files, setfiles] = useState([]); @@ -20,7 +27,11 @@ export default function Upload() { onDragLeave: doNothing, }); return ( -
+

Upload New Documentation

Train - +
From 2523d039fb244cbd327b86e4c2bbf78dae351e48 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 17 Mar 2023 11:19:09 +0000 Subject: [PATCH 7/7] Little cloud - right size and location --- frontend/src/Navigation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index 562be92..b2b6328 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -133,7 +133,7 @@ export default function Navigation({ />
setUploadModalState('ACTIVE')} >