Use in-browser platform check in DownloadLink
This commit is contained in:
parent
8d9e63ad53
commit
6ea5e41368
2 changed files with 2 additions and 9 deletions
|
@ -257,7 +257,7 @@ export let DownloadLink = React.createClass({
|
|||
</span>
|
||||
);
|
||||
} else if (this.props.state == 'done') {
|
||||
const openInFolderMessage = localStorage.getItem('platform') == 'Darwin' ? 'Open in Finder' : 'Open in Folder';
|
||||
const openInFolderMessage = window.navigator.platform.startsWith('Mac') ? 'Open in Finder' : 'Open in Folder';
|
||||
linkBlock = (
|
||||
<DropDown button="alt" label="Open" onClick={this.handleClick} onCaretClick={this.openMenu}>
|
||||
<MenuItem onClick={this.handleRevealClicked} label={openInFolderMessage} />
|
||||
|
|
|
@ -26,14 +26,7 @@ var init = function() {
|
|||
}
|
||||
});
|
||||
} else {
|
||||
if (localStorage.getItem('platform') === null) {
|
||||
lbry.getVersionInfo(({os_system}) => {
|
||||
localStorage.setItem('platform', os_system);
|
||||
ReactDOM.render(<App/>, canvas);
|
||||
});
|
||||
} else {
|
||||
ReactDOM.render(<App/>, canvas);
|
||||
}
|
||||
ReactDOM.render(<App/>, canvas);
|
||||
}
|
||||
}}/>,
|
||||
canvas
|
||||
|
|
Loading…
Reference in a new issue