Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/UI changes #136

Merged
merged 7 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions frontend/src/app/pages/BasicCalendar/BasicCalendar.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
background-color: var(--mui-palette-primary-main);
}

.rbc-event-content{
background-color: var(--mui-palette-primary-main);
}


.rbc-off-range-bg {
background-color: rgba(200, 200, 200, 0.5); /* Light gray */
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/pages/Notifications/Notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const Notifications: React.FC = () => {
<Typography variant="h5" gutterBottom>
Notifications
</Typography>
<Button variant="outlined" onClick={markAllAsRead}>
<Button variant="contained" color="inherit" onClick={markAllAsRead}>
Mark All as Read
</Button>
<Button variant="contained" color="primary" onClick={() => setOpen(true)} style={{ marginLeft: '16px' }}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useEffect, useState} from 'react';
import { Box, Tab, Tabs } from '@mui/material';
import { useTheme } from '@mui/material/styles';
import VolunteerRoles from './VolunteerRoles';
import { useAuth } from '@lib/context/AuthContext';
import { useVolunteerRoleStore } from '@stores/useVolunteerRoleStore';
Expand Down Expand Up @@ -30,6 +31,7 @@ const VolunteerManagement: React.FC = () => {
const { user } = useAuth();
const { fetchVolunteerRoles } = useVolunteerRoleStore();
const { fetchInit } = useManageUserStore();
const theme = useTheme();

useEffect(() => {
if (user) {
Expand All @@ -48,6 +50,12 @@ const VolunteerManagement: React.FC = () => {
value={tabValue}
onChange={handleTabChange}
centered
sx={{
'& .Mui-selected': {
color: theme.palette.text.primary
}
}}

>
<Tab label="Manage Users" />
<Tab label="Volunteer Roles" />
Expand Down
33 changes: 15 additions & 18 deletions frontend/src/components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react';
import AppBar from '@mui/material/AppBar';
import { ListItemButton } from '@mui/material';
import Box from '@mui/material/Box';
import CssBaseline from '@mui/material/CssBaseline';
import Divider from '@mui/material/Divider';
Expand All @@ -17,7 +18,7 @@ import AccountCircleIcon from '@mui/icons-material/AccountCircle';
import NotificationsIcon from '@mui/icons-material/Notifications';
import QuestionAnswerIcon from '@mui/icons-material/QuestionAnswer';
import BHASLogo from '@assets/BHAS-Logo.png';
import { Link, Outlet } from 'react-router-dom';
import { Link, Outlet, useLocation } from 'react-router-dom';
import { useBackendUserStore } from '@stores/useBackendUserStore';

type SideBarItem = {
Expand Down Expand Up @@ -60,6 +61,7 @@ const Dashboard: React.FC = () => {
const [mobileOpen, setMobileOpen] = React.useState(false);
const [isClosing, setIsClosing] = React.useState(false);
const { backendUser } = useBackendUserStore();
const location = useLocation();

const handleDrawerClose = () => {
setIsClosing(true);
Expand All @@ -83,33 +85,28 @@ const Dashboard: React.FC = () => {
<List>
{sideBarItems.map((item, index) => {
if (!item.admin || backendUser?.is_admin) {
const isActive = location.pathname === item.route;
return <ListItem key={index} disablePadding>
<Button
component={Link}
variant='contained'
sx={{
margin: '0.5rem',
width: '100%',
height: '4rem',
fontWeight: 'bold',
}}
to={item.route}
>
<div
style={{
<ListItemButton
component={Link}
to={item.route}
sx={{
margin: '0.5rem',
height: '4rem',
display: 'flex',
gap: '0.5rem',
alignItems: 'center',
justifyContent: 'center',
borderRadius: '8px',
backgroundColor: isActive ? 'action.selected' : 'transparent',
}}
>
{item.icon}
<div style={{ whiteSpace: 'pre-line' }} >
{item.name}
</div>
</div>
</Button>
</ListItem>;
{/* </div> */}
</ListItemButton>
</ListItem>
}
})}
</List>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/theme/baseTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ export const baseTheme: ThemeOptions = {
},
},
}

6 changes: 3 additions & 3 deletions frontend/src/theme/darkTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ export const darkTheme = createTheme({
},
background: {
default: '#26272b',
paper: '#1b1c1f',
base1: '#1b1c1f',
paper: '#333333',
base1: '#26272b',
},
notification: {
unread: '#444746',
read: '#000',
background: '#1e1e1e'
background: '#181818'
}
},
});
7 changes: 3 additions & 4 deletions frontend/src/theme/lightTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ export const lightTheme = createTheme({
}
},
components: {
...baseTheme.components,
MuiButton: {
MuiListItemButton: {
styleOverrides: {
contained: {
root: {
'&:hover': {
color: '#fff',
color: 'black'
}
}
}
Expand Down