diff --git a/js/page/help.js b/js/page/help.js index 5e9515965..60c70d2a6 100644 --- a/js/page/help.js +++ b/js/page/help.js @@ -17,21 +17,26 @@ var HelpPage = React.createClass({ document.title = "Help"; }, render: function() { - var ver = this.state.versionInfo; + let ver, osName, platform, newVerLink, lbryId; + if (this.state.versionInfo) { + ver = this.state.versionInfo; + + lbryId = ver.lbry_id; - if (ver) { if (ver.os_system == 'Darwin') { - var osName = (parseInt(ver.os_release.match(/^\d+/)) < 16 ? 'Mac OS X' : 'Mac OS'); + osName = (parseInt(ver.os_release.match(/^\d+/)) < 16 ? 'Mac OS X' : 'Mac OS'); - var platform = osName + ' ' + ver.os_release; - var newVerLink = 'https://lbry.io/get/lbry.dmg'; + platform = `${osName} ${ver.os_release}` + newVerLink = 'https://lbry.io/get/lbry.dmg'; } else if (ver.os_system == 'Linux') { - var platform = 'Linux (' + ver.platform + ')'; - var newVerLink = 'https://lbry.io/get/lbry.deb'; + platform = `Linux (${ver.platform})`; + newVerLink = 'https://lbry.io/get/lbry.deb'; } else { - var platform = 'Windows (' + ver.platform + ')'; - var newVerLink = 'https://lbry.io/get/lbry.msi'; + platform = `Windows (${ver.platform})`; + newVerLink = 'https://lbry.io/get/lbry.msi'; } + } else { + ver = null; } return ( @@ -60,7 +65,7 @@ var HelpPage = React.createClass({

About

{ver.lbrynet_update_available || ver.lbryum_update_available ? -

A newer version of LBRY is available.

+

A newer version of LBRY is available.

:

Your copy of LBRY is up to date.

} @@ -77,6 +82,10 @@ var HelpPage = React.createClass({ + + + +
Platform {platform}
Installation ID{lbryId}