diff --git a/pages/course/[courseid].tsx b/pages/course/[courseid].tsx index e169fa58..4801e743 100755 --- a/pages/course/[courseid].tsx +++ b/pages/course/[courseid].tsx @@ -27,6 +27,7 @@ import { ToggleButton, ToggleButtonGroup, Typography, + useTheme, } from '@mui/material'; import Link from '@src/Link'; import { @@ -82,6 +83,8 @@ const CourseId: NextPage = ({ ({ user } = authContext); } + const theme = useTheme(); + const [activeSemesters, setActiveSemesters] = useState( defaultSemesterToggles, ); @@ -386,7 +389,7 @@ const CourseId: NextPage = ({ {mapPayloadToArray(courseReviews, REVIEW_ID, DESC).map( (value: Review) => ( - + ), @@ -414,6 +417,7 @@ const CourseId: NextPage = ({ onClose={handleReviewModalClose} maxWidth='md' closeAfterTransition + PaperProps={{sx:{backgroundImage: 'none'}}} > @@ -421,6 +425,17 @@ const CourseId: NextPage = ({ ariaLabel='Review Dial' sx={{ position: 'fixed', bottom: 40, right: 40 }} icon={} + FabProps={{ + sx :{ + border: `1px solid ${theme.palette.secondary.contrastText}`, + backgroundColor: `${theme.palette.secondary.main}`, + color: `${theme.palette.secondary.contrastText}`, + "&:hover":{ + backgroundColor:`${theme.palette.secondary.contrastText}`, + color:`${theme.palette.secondary.main}` + } + } + }} > {actions .flatMap((action) => { @@ -431,9 +446,19 @@ const CourseId: NextPage = ({ }) .map((action) => ( ))} diff --git a/pages/index.tsx b/pages/index.tsx index d76f21fb..7d205735 100755 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -2,7 +2,7 @@ import backend from '@backend/index'; import { courseFields } from '@globals/constants'; import { Course } from '@globals/types'; import { mapDynamicCoursesDataToCourses } from '@globals/utilities'; -import { Tooltip, useMediaQuery, Box, Container, Grid, Typography } from '@mui/material'; +import { Tooltip, useMediaQuery, Box, Container, Grid, Typography, useTheme } from '@mui/material'; import { DataGrid, @@ -26,6 +26,9 @@ const Home: NextPage = ({ allCourseData }) => { allCourseData, courseFields.NAME, ); + + const theme = useTheme(); + const courses = coursesArray.map((data, i) => ({ ...data, id: i })); const columns: GridColDef[] = [ @@ -35,8 +38,8 @@ const Home: NextPage = ({ allCourseData }) => { flex: isDesktop ? 1 : 0, minWidth: isDesktop ? 50 : 200, renderCell: (params: GridRenderCellParams) => ( - - + + {params.row.name} @@ -134,7 +137,9 @@ const Home: NextPage = ({ allCourseData }) => { disableDensitySelector: true, showQuickFilter: true, sx:{ - + '& .MuiButton-root':{ + color: `${theme.palette.mode == 'dark' ? 'secondary.contrastText' : 'secondary.main'}`, + } } }, }} diff --git a/src/components/ClassCard.tsx b/src/components/ClassCard.tsx index 901eaa08..a11c56b7 100755 --- a/src/components/ClassCard.tsx +++ b/src/components/ClassCard.tsx @@ -33,7 +33,7 @@ const ClassCard = ({ ...props }: ClassCardProps) => { const router = useRouter(); return ( - + { router.push({ diff --git a/src/components/FormEditor.tsx b/src/components/FormEditor.tsx index 8d4b45eb..a1188d4b 100644 --- a/src/components/FormEditor.tsx +++ b/src/components/FormEditor.tsx @@ -1,3 +1,4 @@ +import { Box } from '@mui/material'; import { useTheme } from '@mui/material/styles'; import '@toast-ui/editor/dist/toastui-editor.css'; import { Editor } from '@toast-ui/react-editor'; @@ -23,6 +24,51 @@ export default function FormEditor({ onChange(clean); } return ( + + ); } diff --git a/src/components/NavBar.tsx b/src/components/NavBar.tsx index 8fa24f42..3811a6e2 100755 --- a/src/components/NavBar.tsx +++ b/src/components/NavBar.tsx @@ -46,16 +46,18 @@ export const NavBar = ({ ...props }: NavBarProps) => { return ( + + { OMSHub + + + {Object.keys(navigationMenuItems).map( (name: string, index: number) => ( @@ -96,6 +102,7 @@ export const NavBar = ({ ...props }: NavBarProps) => { ), )} + { onClick={()=>setMode(mode == 'light' ? 'dark' : 'light')} color="inherit" > - {theme.palette.mode === 'dark' ? ( ) : ( - )} - + )} + + + { mx: 1.5, }} > - - + + {/* User Profile Side */} diff --git a/src/components/ProfileMenu.tsx b/src/components/ProfileMenu.tsx index 68c0b159..df1dabcc 100644 --- a/src/components/ProfileMenu.tsx +++ b/src/components/ProfileMenu.tsx @@ -31,7 +31,7 @@ const ProfileMenu = (profileMenuItems: MenuLinksProps) => { return ( <> - + @@ -235,7 +243,7 @@ const ReviewCard = ({ {/* Not User View */} {!isFirefox && ( - + @@ -255,7 +263,7 @@ const ReviewCard = ({ {/* User Review View */} {isUserReviewsView ? ( <> - + diff --git a/src/components/ReviewForm.tsx b/src/components/ReviewForm.tsx index e7d3fbce..d9da2f81 100644 --- a/src/components/ReviewForm.tsx +++ b/src/components/ReviewForm.tsx @@ -197,9 +197,10 @@ const ReviewForm = ({ return ( {`Add Review for ${courseData.courseId}: ${courseData.name}`} diff --git a/src/theme.ts b/src/theme.ts index d5c7c02a..554f724a 100755 --- a/src/theme.ts +++ b/src/theme.ts @@ -1,6 +1,6 @@ import { PaletteMode } from '@mui/material'; import { red } from '@mui/material/colors'; -import { navyBlue, techGold } from '@src/colorPalette'; +import { navyBlue } from '@src/colorPalette'; @@ -17,6 +17,7 @@ export const getDesignTokens = (mode: PaletteMode ) => ({ }, secondary: { main: navyBlue, + contrastText: '#FFF' }, error: { main: red.A400, @@ -29,11 +30,13 @@ export const getDesignTokens = (mode: PaletteMode ) => ({ //Dark { primary: { - main: '#FFF', - contrastText: '#000', + main: '#000', + contrastText: '#FFF', }, secondary: { - main: techGold, + main: '#121212', + light: '#232428', + contrastText: "#FFF" }, error: { main: red.A400,