Skip to content

Commit

Permalink
tooltips toegevoegd, breedte mainpage gefixt en alignment coursecards
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendemeurichy committed May 21, 2024
1 parent 1dbef51 commit 9fc1843
Show file tree
Hide file tree
Showing 12 changed files with 467 additions and 317 deletions.
26 changes: 20 additions & 6 deletions frontend/frontend/src/components/CourseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ export function CourseCard({
</Typography>
<Typography
id="deadline"
minWidth={50}
minWidth={80}
>
Deadline
</Typography>
Expand All @@ -341,7 +341,7 @@ export function CourseCard({
</Typography>
<Typography
id="deadline"
minWidth={50}
minWidth={90}
>
Deadline
</Typography>
Expand All @@ -361,6 +361,20 @@ export function CourseCard({
}}
>
<List disablePadding={true}>
{assignments.length === 0 && (
<Box
display={'flex'}
alignItems={'center'}
justifyContent={'center'}
py={6}
flexGrow={1}
height={'100%'}
>
<Typography>
{t('no_projects')}
</Typography>
</Box>
)}
{assignments
.filter(
(assignment) =>
Expand All @@ -377,9 +391,9 @@ export function CourseCard({
dueDate={
assignment.deadline
? dayjs(
assignment.deadline
assignment.deadline
).format(
'DD/MM/YYYY HH:mm'
'DD/MM/YYYY HH:mm'
)
: undefined
}
Expand Down Expand Up @@ -418,9 +432,9 @@ export function CourseCard({
dueDate={
assignment.deadline
? dayjs(
assignment.deadline
assignment.deadline
).format(
'DD/MM/YYYY HH:mm'
'DD/MM/YYYY HH:mm'
)
: undefined
}
Expand Down
22 changes: 12 additions & 10 deletions frontend/frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,18 @@ export const Header = ({ variant, title }: Props) => {
{title}
</Typography>
{variant === 'editable' && (
<IconButton
onClick={handleEdit}
disableRipple={true}
sx={{
marginBottom: 1,
color: 'text.secondary',
}}
>
<EditIcon />
</IconButton>
<Tooltip title={t('edit')}>
<IconButton
onClick={handleEdit}
disableRipple={true}
sx={{
marginBottom: 1,
color: 'background.default',
}}
>
<EditIcon />
</IconButton>
</Tooltip>
)}
</Box>

Expand Down
10 changes: 8 additions & 2 deletions frontend/frontend/src/components/TabSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default function TabSwitcher({
<>
<Tabs defaultValue={0} color={'background.default'}>
<Box
width={'100%'}
display={'flex'}
flexDirection={'row'}
justifyContent={'space-between'}
Expand Down Expand Up @@ -84,7 +85,12 @@ export default function TabSwitcher({
)}
</Box>
{nodes.map((node, index) => (
<TabPanel id={`node${index}`} key={index} value={index}>
<TabPanel
id={`node${index}`}
key={index}
value={index}
sx={{ width: '100%' }}
>
{node}
</TabPanel>
))}
Expand Down Expand Up @@ -131,7 +137,7 @@ const Tab = styled(BaseTab)`

const TabPanel = styled(BaseTabPanel)(
({ theme }) => `
width: "15%";
width: "100%";
font-family: 'IBM Plex Sans', sans-serif;
font-size: 0.875rem;
padding: 20px 12px;
Expand Down
4 changes: 4 additions & 0 deletions frontend/frontend/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ const english = {
openinUi: 'Open in UI',
openInEditor: 'Open in editor',
no_params: 'No parameters where found in the template.',
save_scores: 'Save Scores',
add_course: 'Add course',
add_project: 'Add project',
no_projects: 'No projects',
}

export default english
4 changes: 4 additions & 0 deletions frontend/frontend/src/i18n/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ const dutch = {
openinUi: 'Open in UI',
openInEditor: 'Open in editor',
no_params: 'Geen parameters gevonden in de template.',
save_scores: 'Scores Opslaan',
add_course: 'Voeg vak toe',
add_project: 'Voeg project toe',
no_projects: 'Geen projecten',
}

export default dutch
Loading

0 comments on commit 9fc1843

Please sign in to comment.