-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
publish: Add Ubuntu 24.04 cozy-stack packages
generated from commit b2d4b2f
- Loading branch information
Travis CI User
committed
Jul 12, 2024
1 parent
6e7dd3c
commit 960fe82
Showing
25 changed files
with
763 additions
and
759 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
56 changes: 56 additions & 0 deletions
56
en/cozy-home/src/components/Sections/GroupedSectionTile.tsx
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,56 @@ | ||
import React from 'react' | ||
import { useNavigate } from 'react-router-dom' | ||
|
||
import SquareAppIcon from 'cozy-ui/transpiled/react/SquareAppIcon' | ||
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n' | ||
|
||
import SectionAppGroup from 'components/Sections/SectionAppGroup' | ||
import { get4FirstItems } from 'components/Sections/utils' | ||
import { GroupedSectionTileProps } from 'components/Sections/SectionsTypes' | ||
|
||
const GroupedSectionTile = ({ | ||
section | ||
}: GroupedSectionTileProps): JSX.Element | null => { | ||
const navigate = useNavigate() | ||
const { t } = useI18n() | ||
|
||
const handleNavigation = ( | ||
name: string, | ||
type: 'konnectors' | 'shortcuts' | ||
): void => { | ||
navigate(`categories/${type}/${name}`) | ||
} | ||
|
||
// We add a failsafe in the view to avoid rendering an empty section | ||
// This case appeared in prod environment but wasn't expected to be possible | ||
if (section.items.length === 0) return null | ||
|
||
return ( | ||
<a | ||
key={section.id} | ||
onClick={(): void => | ||
handleNavigation( | ||
section.id, | ||
section.type === 'category' ? 'konnectors' : 'shortcuts' | ||
) | ||
} | ||
className="scale-hover u-c-pointer" | ||
> | ||
<SquareAppIcon | ||
name={ | ||
section.type === 'category' | ||
? t(`category.${section.name}`) | ||
: section.name | ||
} | ||
IconContent={<SectionAppGroup items={get4FirstItems(section)} />} | ||
variant={section.pristine ? 'ghost' : 'normal'} | ||
style={{ | ||
alignItems: 'flex-start', | ||
justifyContent: 'flex-start' | ||
}} | ||
/> | ||
</a> | ||
) | ||
} | ||
|
||
export default GroupedSectionTile |
Oops, something went wrong.