-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6dbe9e9
commit 4f4720d
Showing
6 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -10,3 +10,4 @@ build/ | |
*.yaml | ||
Dockerfile | ||
*.rpi | ||
*.scss |
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
50 changes: 50 additions & 0 deletions
50
src/webui/components/PackageSidebar/modules/DistTags/index.jsx
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,50 @@ | ||
import React from 'react'; | ||
import propTypes from 'prop-types'; | ||
import Module from '../../Module'; | ||
import ModuleContentPlaceholder from '../../ModuleContentPlaceholder'; | ||
|
||
import classes from './style.scss'; | ||
|
||
const renderDistTags = (distTags) => { | ||
|
||
const tags = Object.entries(distTags); | ||
|
||
return ( | ||
<ul> | ||
{tags.map((tagItem) => { | ||
const [tag, version] = tagItem; | ||
|
||
return ( | ||
<li className={'dist-tag-item'} key={tag}> | ||
<span>{tag}</span> | ||
<span>{version}</span> | ||
</li> | ||
); | ||
})} | ||
</ul> | ||
); | ||
}; | ||
|
||
const DistTags = ({distTags = {}}) => { | ||
const hasTags = Object.keys(distTags).length > 0; | ||
|
||
return ( | ||
<Module | ||
className={classes.releasesModule} | ||
description={''} | ||
title={'Dist-Tags'} | ||
> | ||
{hasTags ? ( | ||
renderDistTags(distTags) | ||
) : ( | ||
<ModuleContentPlaceholder text={'Not Available!'} /> | ||
)} | ||
</Module> | ||
); | ||
}; | ||
|
||
DistTags.propTypes = { | ||
distTags: propTypes.array, | ||
}; | ||
|
||
export default DistTags; |
13 changes: 13 additions & 0 deletions
13
src/webui/components/PackageSidebar/modules/DistTags/style.scss
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,13 @@ | ||
@import '../../../../styles/variables'; | ||
|
||
.releasesModule { | ||
li { | ||
display: flex; | ||
font-size: $font-size-sm; | ||
line-height: $line-height-xs; | ||
|
||
span:last-child { | ||
margin-left: auto; | ||
} | ||
} | ||
} |