|
3 | 3 | * Licensed under the MIT License. See LICENSE file in the project root for license information. |
4 | 4 | *-----------------------------------------------------------------------------------------------*/ |
5 | 5 | import React from 'react'; |
6 | | -import StarIcon from '@mui/icons-material/Star'; |
7 | | -import StarBorderIcon from '@mui/icons-material/StarBorder'; |
8 | | -import { Card, makeStyles, Typography } from '@material-ui/core'; |
| 6 | +import CheckBoxOutlineBlankOutlinedIcon from '@mui/icons-material/CheckBoxOutlineBlankOutlined'; |
| 7 | +import CheckBoxOutlinedIcon from '@mui/icons-material/CheckBoxOutlined'; |
| 8 | +import { Badge, Card, makeStyles, Typography } from '@material-ui/core'; |
9 | 9 | import { CompTypeDesc } from './gitImport'; |
10 | 10 | import cardItemStyle from './cardItem.style'; |
11 | 11 |
|
@@ -36,27 +36,39 @@ export const CardItem: React.FC<CardProps> = ({ |
36 | 36 | src={compDesc.devfileData.devfile.metadata.icon} |
37 | 37 | className={style.cardImage} /> |
38 | 38 | <div className={style.cardRegistryTitle}> |
39 | | - {compDesc.selected ? <StarIcon style={{ fontSize: 20 }} /> : <StarBorderIcon style={{ fontSize: 20 }} />} |
| 39 | + {compDesc.selected ? <CheckBoxOutlinedIcon style={{ fontSize: 20, color: '#EE0000' }} /> : <CheckBoxOutlineBlankOutlinedIcon style={{ fontSize: 20, color: '#EE0000' }} />} |
40 | 40 | </div> |
41 | 41 | </div> |
42 | 42 | </div> |
43 | 43 | <div style={{ margin: '1.5rem' }}> |
44 | 44 | <Typography variant='body1'>{compDesc.devfileData.devfile.metadata.name}</Typography> |
45 | 45 | </div> |
46 | | - <div className={style.cardBody}> |
| 46 | + <div style={{ display: 'flex', flexDirection: 'row', gap: '1rem', width: 'auto' }}> |
| 47 | + <div className={style.cardBody}> |
| 48 | + { |
| 49 | + compDesc.devfileData.devfile.metadata.version && ( |
| 50 | + <Typography variant='caption'> |
| 51 | + Version: {compDesc.devfileData.devfile.metadata.version}<br /> |
| 52 | + </Typography> |
| 53 | + ) |
| 54 | + } |
| 55 | + <Typography variant='caption'> |
| 56 | + Project Type: {capitalizeFirstLetter(compDesc.devfileData.devfile.metadata.projectType)}<br /> |
| 57 | + </Typography> |
| 58 | + <Typography variant='caption'> |
| 59 | + Language: {capitalizeFirstLetter(compDesc.devfileData.devfile.metadata.language)}<br /> |
| 60 | + </Typography> |
| 61 | + </div> |
47 | 62 | { |
48 | | - compDesc.devfileData.devfile.metadata.version && ( |
49 | | - <Typography variant='caption'> |
50 | | - Version: {compDesc.devfileData.devfile.metadata.version}<br /> |
51 | | - </Typography> |
52 | | - ) |
| 63 | + compDesc.registry.name.toLowerCase() !== 'defaultdevfileregistry' && |
| 64 | + <div style={{alignSelf:'flex-end', marginBottom: '2rem'}}> |
| 65 | + <Badge key='badge' className={style.badge} |
| 66 | + overlap='rectangular' |
| 67 | + variant='standard'> |
| 68 | + {compDesc.registry.name} |
| 69 | + </Badge> |
| 70 | + </div> |
53 | 71 | } |
54 | | - <Typography variant='caption'> |
55 | | - Project Type: {capitalizeFirstLetter(compDesc.devfileData.devfile.metadata.projectType)}<br /> |
56 | | - </Typography> |
57 | | - <Typography variant='caption'> |
58 | | - Language: {capitalizeFirstLetter(compDesc.devfileData.devfile.metadata.language)}<br /> |
59 | | - </Typography> |
60 | 72 | </div> |
61 | 73 | </Card> |
62 | 74 | </> |
|
0 commit comments