Skip to content
Open
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 manifest.webapp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Papillon",
"slug": "papillon",
"version": "1.3.0",
"version": "1.4.0",
"type": "webapp",
"icon": "icon.svg",
"categories": ["others"],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cozy-papillon-app",
"version": "1.3.0",
"version": "1.4.0",
"engines": {
"node": "~16 || ~20"
},
Expand Down Expand Up @@ -65,7 +65,7 @@
"cozy-intent": "^2.27.0",
"cozy-logger": "^1.14.0",
"cozy-minilog": "^3.7.0",
"cozy-ui": "^113.0.0",
"cozy-ui": "^130.3.1",
"date-fns": "2.29.3",
"lodash": "4.17.21",
"react": "18.3.1",
Expand Down
16 changes: 10 additions & 6 deletions src/components/AppLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,32 +81,34 @@
)
}

const mt = (isMobile ? '.short' : '');

Check failure on line 84 in src/components/AppLayout.jsx

View workflow job for this annotation

GitHub Actions / Build and publish

Replace `(isMobile·?·'.short'·:·'');` with `isMobile·?·'.short'·:·''`

return (
<Layout>
<Sidebar style={isMobile ? { overflow: 'hidden' } : {}}>
<Nav>
<NavItem>
<NavLink {...makeProps(['timetable'])}>
<NavIcon icon={CalendarIcon} />
<NavText>{t('Sidebar.timetable')}</NavText>
<NavText>{t('Sidebar.timetable'+mt)}</NavText>

Check failure on line 93 in src/components/AppLayout.jsx

View workflow job for this annotation

GitHub Actions / Build and publish

Replace `+` with `·+·`
</NavLink>
</NavItem>
<NavItem>
<NavLink {...makeProps(['homeworks'])}>
<NavIcon icon={CheckboxIcon} />
<NavText>{t('Sidebar.homeworks')}</NavText>
<NavText>{t('Sidebar.homeworks'+mt)}</NavText>

Check failure on line 99 in src/components/AppLayout.jsx

View workflow job for this annotation

GitHub Actions / Build and publish

Replace `+` with `·+·`
</NavLink>
</NavItem>
<NavItem>
<NavLink {...makeProps(['grades'])}>
<NavIcon icon={PieChartIcon} />
<NavText>{t('Sidebar.grades')}</NavText>
<NavText>{t('Sidebar.grades'+mt)}</NavText>

Check failure on line 105 in src/components/AppLayout.jsx

View workflow job for this annotation

GitHub Actions / Build and publish

Replace `+` with `·+·`
</NavLink>
</NavItem>
<NavItem>
<NavLink {...makeProps(['presence'])}>
<NavIcon icon={WalkIcon} />
<NavText>{t('Sidebar.presence')}</NavText>
<NavText>{t('Sidebar.presence'+mt)}</NavText>

Check failure on line 111 in src/components/AppLayout.jsx

View workflow job for this annotation

GitHub Actions / Build and publish

Replace `+` with `·+·`
</NavLink>
</NavItem>
<NavItem>
Expand All @@ -115,7 +117,7 @@
target={isFlagshipApp() ? '_self' : '_blank'}
>
<NavIcon icon={FolderIcon} />
<NavText>{t('Sidebar.documents')}</NavText>
<NavText>{t('Sidebar.documents'+mt)}</NavText>

Check failure on line 120 in src/components/AppLayout.jsx

View workflow job for this annotation

GitHub Actions / Build and publish

Replace `+` with `·+·`
{!isMobile && (
<Icon
icon={OpenappIcon}
Expand All @@ -137,7 +139,9 @@
<Typography variant="h5">{client.appMetadata.slug}</Typography>
</BarCenter>
)}
<Outlet />
<div>
<Outlet />
</div>
</Content>
</Main>
<Alerter t={t} />
Expand Down
11 changes: 8 additions & 3 deletions src/components/Atoms/AccountSwitcher.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,16 @@ export const AccountSwitcher = () => {
const btnRef = useRef(null)

if (!accountsList || accountsList.length < 2) {
return null
return (
<Typography noWrap variant="h4" color="textPrimary">
{currentAccount?.contact?.name?.givenName}{' '}
{currentAccount?.contact?.name?.familyName}
</Typography>
)
}

return (
<div>
<>
<DropdownButton ref={btnRef} onClick={() => setAccountMenuShown(true)}>
<Typography noWrap variant="h4" color="textPrimary">
{currentAccount?.contact?.name?.givenName}{' '}
Expand Down Expand Up @@ -103,6 +108,6 @@ export const AccountSwitcher = () => {
</ActionsMenuItem>
))}
</ActionsMenuWrapper>
</div>
</>
)
}
4 changes: 2 additions & 2 deletions src/components/Atoms/Grades/GradeItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
/>
<div className="cozy-grade-chip" style={style.cozyGradeChip}>
<Typography variant="body2" color="textPrimary">
{parseFloat(grade.value.student).toFixed(2)}
{isNaN(parseFloat(grade.value.student)) ? 'N/A' : parseFloat(grade.value.student).toFixed(2)}

Check failure on line 46 in src/components/Atoms/Grades/GradeItem.jsx

View workflow job for this annotation

GitHub Actions / Build and publish

Replace `·?·'N/A'` with `⏎··············?·'N/A'⏎·············`
</Typography>
<Typography variant="body2" color="textSecondary">
/{parseFloat(grade.value.outOf).toFixed(0)}
/{isNaN(parseFloat(grade.value.outOf)) ? 'N/A' : parseFloat(grade.value.outOf).toFixed(0)}

Check failure on line 49 in src/components/Atoms/Grades/GradeItem.jsx

View workflow job for this annotation

GitHub Actions / Build and publish

Replace `{isNaN(parseFloat(grade.value.outOf))·?·'N/A'` with `⏎············{isNaN(parseFloat(grade.value.outOf))⏎··············?·'N/A'⏎·············`
</Typography>
</div>
</ListItem>
Expand Down
Loading