Skip to content

Commit

Permalink
show module count for repos
Browse files Browse the repository at this point in the history
  • Loading branch information
DerGoogler committed May 12, 2024
1 parent 956689e commit 66a667c
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions Website/src/activitys/RepoActivity/components/LocalRepository.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Collapse from "@mui/material/Collapse";
import { useRepos } from "@Hooks/useRepos";
import { useSettings } from "@Hooks/useSettings";
import { useStrings } from "@Hooks/useStrings";
import { IconButton, List, ListItem, ListItemButton, ListItemIcon, ListItemText, Switch } from "@mui/material";
import { IconButton, List, ListItem, ListItemButton, ListItemIcon, ListItemText, Switch, Typography } from "@mui/material";
import { OverridableComponent } from "@mui/material/OverridableComponent";
import { SvgIconTypeMap } from "@mui/material/SvgIcon/SvgIcon";
import { DeleteRounded, LanguageRounded, SupportRounded, UploadFileRounded, VolunteerActivismRounded } from "@mui/icons-material";
Expand Down Expand Up @@ -86,7 +86,30 @@ export const LocalRepository = React.memo<LocalRepositoryProps>((props) => {
<>
<ListItem>
<ListItemIcon onClick={handleClick}>{open ? <ExpandLess /> : <ExpandMore />}</ListItemIcon>
<ListItemText primary={repo.name} secondary={formatLastUpdate} />
<ListItemText
primary={repo.name}
secondary={
<>
<Typography variant="body2">{formatLastUpdate}</Typography>

<Typography variant="body2" sx={{}}>
Holds{" "}
<Typography
component="span"
variant="body2"
sx={{
background: "-webkit-linear-gradient(132deg, rgba(188,2,194,1) 10%,rgba(255,255,255,1) 100%, rgba(74,20,140,0.5) 50%)",
WebkitBackgroundClip: "text",
WebkitTextFillColor: "transparent",
}}
>
{data.modules.length.toString()}
</Typography>{" "}
modules
</Typography>
</>
}
/>

<Switch
edge="end"
Expand Down

0 comments on commit 66a667c

Please sign in to comment.