Fixed: Highlight currently install version of Lidarr in Updates

This commit is contained in:
Qstick
2019-04-06 22:50:53 -04:00
parent 5643923299
commit 11eaa58c1c
3 changed files with 26 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ class Updates extends Component {
render() {
const {
currentVersion,
isFetching,
isPopulated,
error,
@@ -119,13 +120,25 @@ class Updates extends Component {
<div className={styles.date}>{formatDate(update.releaseDate, shortDateFormat)}</div>
{
update.branch !== 'master' &&
update.branch === 'master' ?
null :
<Label
className={styles.branch}
className={styles.label}
>
{update.branch}
</Label>
}
{
update.version === currentVersion ?
<Label
className={styles.label}
kind={kinds.SUCCESS}
>
Currently Installed
</Label> :
null
}
</div>
{
@@ -168,6 +181,7 @@ class Updates extends Component {
}
Updates.propTypes = {
currentVersion: PropTypes.string.isRequired,
isFetching: PropTypes.bool.isRequired,
isPopulated: PropTypes.bool.isRequired,
error: PropTypes.object,