From 6cdb4d471ae8303e83215ac0a9b405e641c24f95 Mon Sep 17 00:00:00 2001
From: Emily <44536222+emi-hi@users.noreply.github.com>
Date: Tue, 5 Mar 2024 11:42:12 -0800
Subject: [PATCH] CTHUB - Frontend styling for upload and user permissions page
(#196)
* feat: frontend changes for upload and user admin
* chore: removes react Fragment and replaces with grid container, adds grey background to file upload grid
* chore: adds responsiveness to permissions
---
react/src/app/styles/App.scss | 18 +++++++++
react/src/app/styles/FileUpload.scss | 20 ++++++++--
react/src/app/styles/Users.scss | 12 ++++--
react/src/uploads/UploadContainer.js | 41 ++++++++++++--------
react/src/uploads/components/FileDrop.js | 5 +--
react/src/uploads/components/FileDropArea.js | 23 +++++------
react/src/uploads/components/UploadPage.js | 22 +++++------
react/src/users/components/UsersPage.js | 28 +++++++------
8 files changed, 102 insertions(+), 67 deletions(-)
diff --git a/react/src/app/styles/App.scss b/react/src/app/styles/App.scss
index b05e911f..89b60e10 100644
--- a/react/src/app/styles/App.scss
+++ b/react/src/app/styles/App.scss
@@ -13,8 +13,10 @@ $highlight: #0078FD;
$default-link-blue: #568DBA;
$default-background-grey: #F2F2F2;
$md: 991px;
+$button-background-blue: #003366;
.App {
+ background-color: $default-background-grey;
.App-header {
-ms-flex-align: center;
-ms-flex-direction: row;
@@ -67,6 +69,8 @@ h2, h3, h4 {
}
h2 {
+ margin-top: 0;
+ margin-bottom: 0;
font-size: 20px;
}
@@ -79,3 +83,17 @@ h4 {
font-size: 14px;
}
+.button-dark-blue {
+ background-color: $button-background-blue !important;
+ color: $bg-white;
+
+ &:disabled {
+ background-color: white !important;
+
+ }
+}
+
+.text-button {
+ color: #1a5a96 !important;
+ text-decoration: underline !important;
+}
\ No newline at end of file
diff --git a/react/src/app/styles/FileUpload.scss b/react/src/app/styles/FileUpload.scss
index fe7a8d30..e9226119 100644
--- a/react/src/app/styles/FileUpload.scss
+++ b/react/src/app/styles/FileUpload.scss
@@ -6,8 +6,10 @@
padding: 0.5rem;
}
#dataset-select {
- padding-bottom: 2rem;
- padding-top: 2rem;
+ margin-bottom: 1rem;
+ margin-top: 1rem;
+ padding: 1rem;
+ background-color: $default-background-grey;
}
#trash-button {
@@ -18,13 +20,23 @@
}
.upload-row {
- height: 15px;
+ background-color: $default-background-grey;
+ padding: .5rem;
+ margin: .5rem;
}
.file-upload {
- border: 2px dashed $default-link-blue;
+ border: 1px dashed $button-background-blue;
background: $bg-white;
padding: 1rem;
text-align: center;
flex-direction: column;
}
+
+.upload-bar {
+ background-color: $default-background-grey;
+ color: $bg-white;
+ padding-top: 1rem;
+ padding-bottom: 1rem;
+ margin-top: 2rem;
+}
diff --git a/react/src/app/styles/Users.scss b/react/src/app/styles/Users.scss
index 564814c6..20bd7092 100644
--- a/react/src/app/styles/Users.scss
+++ b/react/src/app/styles/Users.scss
@@ -1,8 +1,6 @@
.add-user-box {
- height: 4rem;
background-color: $default-background-grey;
margin-bottom: 1rem;
- width: 40%;
}
.permissions {
@@ -12,6 +10,13 @@
.checkbox {
width: 40%;
}
+ @media (max-width:991px) {
+ width: 20%;
+}
+ @media (max-width:599px) {
+ width: 40%;
+}
+
}
.user-input {
@@ -22,4 +27,5 @@
.button-dark-blue {
background-color: #003366 !important;
-}
\ No newline at end of file
+}
+
diff --git a/react/src/uploads/UploadContainer.js b/react/src/uploads/UploadContainer.js
index 8bcbf52d..c550f864 100644
--- a/react/src/uploads/UploadContainer.js
+++ b/react/src/uploads/UploadContainer.js
@@ -1,8 +1,9 @@
import { withRouter } from 'react-router-dom';
import axios from 'axios';
-import CircularProgress from '@mui/material/CircularProgress';
-import Alert from '@mui/material/Alert';
import React, { useState, useEffect } from 'react';
+import {
+ Paper, Alert, CircularProgress, Stack,
+} from '@mui/material';
import ROUTES_UPLOAD from './routes';
import ROUTES_USERS from '../users/routes';
import UploadPage from './components/UploadPage';
@@ -134,20 +135,28 @@ const UploadContainer = () => {
title="Replace existing data?"
/>
)}
-