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