Skip to content
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
2 changes: 1 addition & 1 deletion src/components/Projects/Create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const CreateProject = () => {
},
}

const futureName = `HIP-${title.replace(/[^a-zA-Z0-9]+/g, '-')}`
const futureName = `${title.replace(/[^a-zA-Z0-9]+/g, '-')}`

trackEvent({
category: 'Project',
Expand Down
82 changes: 47 additions & 35 deletions src/components/Projects/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const ProjectCard = ({ project, users }: Props) => {
// Description for collaborative projects in the all collab projects page
return (
<NavLink to={`${ROUTE_PREFIX}/projects/${project.name}`}>
<Card elevation={3} component={Paper} sx={{ width: 280, minHeight: 320 }}>
<CardContent>
<Card elevation={3} component={Paper} sx={{ width: 280, height: 340 }}>
<CardContent sx={{ height: '100%', display: 'flex', flexDirection: 'column' }}>
<Box
sx={{
display: 'flex',
Expand Down Expand Up @@ -65,41 +65,53 @@ const ProjectCard = ({ project, users }: Props) => {
{`Owner: ${projectAdmins?.map(u => u.displayName).join(', ')}`}
</Typography>

<Stack
sx={{
maxHeight: 240,
display: 'flex',
flexDirection: 'column',
overflowY: 'scroll',
}}
>
<Box sx={{ flex: 1, overflow: 'hidden', display: 'flex', flexDirection: 'column' }}>
<Typography variant='subtitle1'>Members</Typography>
{project?.members?.length === 0 && (
<Typography variant='subtitle1'>No members yet</Typography>
)}
{[...(project?.members ?? [])]
.map(
u =>
users.find(user => user.id === u) ?? {
id: u,
name: u,
displayName: u,
}
)

.map(u => (
<Box
key={u.id}
display='flex'
justifyContent='space-between'
alignItems='center'
>
<UserInfo key={u.id} user={u} />
</Box>
))}
</Stack>
<Stack
sx={{
flex: 1,
overflowY: 'auto',
'&::-webkit-scrollbar': {
width: '6px',
},
'&::-webkit-scrollbar-track': {
background: '#f1f1f1',
borderRadius: '10px',
},
'&::-webkit-scrollbar-thumb': {
background: '#888',
borderRadius: '10px',
},
'&::-webkit-scrollbar-thumb:hover': {
background: '#555',
},
}}
>
{project?.members?.length === 0 && (
<Typography variant='subtitle1'>No members yet</Typography>
)}
{[...(project?.members ?? [])]
.map(
u =>
users.find(user => user.id === u) ?? {
id: u,
name: u,
displayName: u,
}
)
.map(u => (
<Box
key={u.id}
display='flex'
justifyContent='space-between'
alignItems='center'
>
<UserInfo key={u.id} user={u} />
</Box>
))}
</Stack>
</Box>
</CardContent>
<Box sx={{ flexGrow: 1 }}></Box>
</Card>
</NavLink>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Projects/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const Projects = () => {
return (
<>
<TitleBar
title={'Collaborative Workspaces Projects'}
title={'Collaborative Workspaces'}
description={
'Collaborate on projects with ease in our secure workspace. Sensitive data remains protected and accessible only to authorized members.'
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/UI/DesktopInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const DesktopInfo = ({ desktop }: { desktop: Container }) => (
</Box>
{desktop.workspace === 'collab' && (
<Typography variant='caption' gutterBottom component='div'>
Project: {desktop.groupIds?.map(g => g.replace('HIP-', '')).join(', ')}
Project: {desktop.groupIds?.join(', ')}
</Typography>
)}
</>
Expand Down