Help: change method used to get LBRY ID

Now uses lbry.getSessionInfo() instead of lbry.getVersionInfo()
This commit is contained in:
Alex Liebowitz 2016-11-30 00:23:57 -05:00
parent 735444f022
commit 406c37f9ff

View file

@ -4,6 +4,7 @@ var HelpPage = React.createClass({
getInitialState: function() { getInitialState: function() {
return { return {
versionInfo: null, versionInfo: null,
lbryId: null,
}; };
}, },
componentWillMount: function() { componentWillMount: function() {
@ -12,17 +13,20 @@ var HelpPage = React.createClass({
versionInfo: info, versionInfo: info,
}); });
}); });
lbry.getSessionInfo((info) => {
this.setState({
lbryId: info.lbry_id,
});
});
}, },
componentDidMount: function() { componentDidMount: function() {
document.title = "Help"; document.title = "Help";
}, },
render: function() { render: function() {
let ver, osName, platform, newVerLink, lbryId; let ver, osName, platform, newVerLink;
if (this.state.versionInfo) { if (this.state.versionInfo) {
ver = this.state.versionInfo; ver = this.state.versionInfo;
lbryId = ver.lbry_id;
if (ver.os_system == 'Darwin') { if (ver.os_system == 'Darwin') {
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');
@ -84,7 +88,7 @@ var HelpPage = React.createClass({
</tr> </tr>
<tr> <tr>
<th>Installation ID</th> <th>Installation ID</th>
<td>{lbryId}</td> <td>{this.state.lbryId}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>