-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/ntgl 820 friend group (#877)
* added Friends Button and styled expanded view of zid and logout button * add or edit group dialog * partial BE added * added all BE * circles in sidebar * styled context menu * deleting groups * dialog now takes in onClose * fixed group interface and edit groups * fixed edit group * fixed prepareData initialisation of groupAdmins * removed console long * added Shared Timetables * friends dialog basic layout * friends tab list added * friend tabs list naming * fetch user info * viewing friends of logged in user * displaying friends * incoming requests * incoming requests template * tooltip for requests * decline friend requests * accept friends * search bar template for add a friend * can unfriend from friends list * can send friend request * can cancel friend request sent * requests added number * BE get all users * search bar implemented to find a friend * adding group uses friends * fixed only showing nonFriends in Add a Friend tab * added text for when tabs are empty * changed background of sending friend request * removed tool tip for adding z in front of zid * fixed update function * working update and add * added badges for friend requests * border for admin * member can leave a group * added validation checks for creating/editing group modal * added input check for editing a group * fixed search query for friends to add to a group * added scrolling if groups overflow * fixed times hidden * fixed right blue padding * moved interfaces * fix(GroupSidebar): build error with theme object not passed to GroupsSidebar.tsx * can add friend by searching zid * cut name and email * disabled shared timetables and changed tool tip to coming soon * in user.service.ts in getUserInfo, added userID property to be returned * fixed pr comments by removing console logs and comments * linting --------- Co-authored-by: Jasmine Tran <[email protected]> Co-authored-by: ray <[email protected]> Co-authored-by: Shaam <[email protected]>
- Loading branch information
1 parent
baa8bca
commit ffc84a7
Showing
27 changed files
with
8,487 additions
and
8,467 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { SwitchAccount } from '@mui/icons-material'; | ||
import { IconButton, Tooltip, Typography } from '@mui/material'; | ||
import { styled } from '@mui/system'; | ||
import React from 'react'; | ||
|
||
interface FriendsButtonProps { | ||
collapsed: boolean; | ||
showGroupsSidebar: boolean; | ||
setShowGroupsSidebar: (showGroupsSidebar: boolean) => void; | ||
} | ||
|
||
const StyledFriendsButton = styled(IconButton)<{ isSelected: boolean }>` | ||
display: flex; | ||
border-radius: 8px; | ||
gap: 16px; | ||
justify-content: flex-start; | ||
padding: 12px 12px 12px 12px; | ||
background-color: ${({ isSelected }) => (isSelected ? 'rgb(157, 157, 157, 0.15)' : 'transparent')}; | ||
`; | ||
|
||
const IndividualComponentTypography = styled(Typography)<{ collapsed: boolean }>` | ||
font-size: 16px; | ||
`; | ||
|
||
const FriendsButton: React.FC<FriendsButtonProps> = ({ collapsed, showGroupsSidebar, setShowGroupsSidebar }) => { | ||
return ( | ||
<> | ||
<Tooltip title="Coming Soon: Shared Timetables" placement="right"> | ||
<StyledFriendsButton | ||
color="inherit" | ||
// onClick={() => setShowGroupsSidebar(!showGroupsSidebar)} NOTE: uncomment to display groups side bar | ||
isSelected={showGroupsSidebar} | ||
> | ||
<SwitchAccount /> | ||
<IndividualComponentTypography collapsed={collapsed}> | ||
{collapsed ? '' : 'Shared Timetables'} | ||
</IndividualComponentTypography> | ||
</StyledFriendsButton> | ||
</Tooltip> | ||
</> | ||
); | ||
}; | ||
|
||
export default FriendsButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.