add temp stub for shell.open on pdf viewer
This commit is contained in:
parent
8ef83bfe6c
commit
a163091560
1 changed files with 7 additions and 0 deletions
|
@ -2,7 +2,9 @@
|
|||
import * as React from 'react';
|
||||
import { stopContextMenu } from 'util/context-menu';
|
||||
import Button from 'component/button';
|
||||
// @if TARGET='app'
|
||||
import { shell } from 'electron';
|
||||
// @endif
|
||||
|
||||
type Props = {
|
||||
source: string,
|
||||
|
@ -22,7 +24,12 @@ class PdfViewer extends React.PureComponent<Props> {
|
|||
openFile() {
|
||||
const { source } = this.props;
|
||||
const path = `file://${source}`;
|
||||
// @if TARGET='app'
|
||||
shell.openExternal(path);
|
||||
// @endif
|
||||
// @if TARGET='web'
|
||||
console.error('provide stub for shell.openExternal');
|
||||
// @endif
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
Loading…
Add table
Reference in a new issue