Merge pull request #97 from lbryio/lbry-id-new-method
Update API method used to get LBRY ID
This commit is contained in:
commit
d913e0be63
2 changed files with 11 additions and 4 deletions
|
@ -310,6 +310,9 @@ lbry.setClientSetting = function(setting, value) {
|
|||
return localStorage.setItem('setting_' + setting, JSON.stringify(value));
|
||||
}
|
||||
|
||||
lbry.getSessionInfo = function(callback) {
|
||||
lbry.call('get_lbry_session_info', {}, callback);
|
||||
}
|
||||
|
||||
lbry.reportBug = function(message, callback) {
|
||||
lbry.call('upload_log', {
|
||||
|
|
|
@ -4,6 +4,7 @@ var HelpPage = React.createClass({
|
|||
getInitialState: function() {
|
||||
return {
|
||||
versionInfo: null,
|
||||
lbryId: null,
|
||||
};
|
||||
},
|
||||
componentWillMount: function() {
|
||||
|
@ -12,17 +13,20 @@ var HelpPage = React.createClass({
|
|||
versionInfo: info,
|
||||
});
|
||||
});
|
||||
lbry.getSessionInfo((info) => {
|
||||
this.setState({
|
||||
lbryId: info.lbry_id,
|
||||
});
|
||||
});
|
||||
},
|
||||
componentDidMount: function() {
|
||||
document.title = "Help";
|
||||
},
|
||||
render: function() {
|
||||
let ver, osName, platform, newVerLink, lbryId;
|
||||
let ver, osName, platform, newVerLink;
|
||||
if (this.state.versionInfo) {
|
||||
ver = this.state.versionInfo;
|
||||
|
||||
lbryId = ver.lbry_id;
|
||||
|
||||
if (ver.os_system == 'Darwin') {
|
||||
osName = (parseInt(ver.os_release.match(/^\d+/)) < 16 ? 'Mac OS X' : 'Mac OS');
|
||||
|
||||
|
@ -84,7 +88,7 @@ var HelpPage = React.createClass({
|
|||
</tr>
|
||||
<tr>
|
||||
<th>Installation ID</th>
|
||||
<td>{lbryId}</td>
|
||||
<td>{this.state.lbryId}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Add table
Reference in a new issue