mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
parent
7e3c0143d1
commit
e6a044d8e1
2 changed files with 4 additions and 7 deletions
|
@ -168,7 +168,7 @@ class FileRender extends React.PureComponent<Props, State> {
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
case RENDER_MODES.COMIC:
|
case RENDER_MODES.COMIC:
|
||||||
return <ComicBookViewer source={{ fileExtension, downloadPath }} theme={currentTheme} />;
|
return <ComicBookViewer source={downloadPath} theme={currentTheme} />;
|
||||||
case RENDER_MODES.APPLICATION:
|
case RENDER_MODES.APPLICATION:
|
||||||
return <AppViewer uri={uri} />;
|
return <AppViewer uri={uri} />;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,7 @@ import 'villain-react/dist/style.css';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
theme: string,
|
theme: string,
|
||||||
source: {
|
source: string,
|
||||||
fileType: string,
|
|
||||||
downloadPath: string,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let workerUrl = 'webworkers/worker-bundle.js';
|
let workerUrl = 'webworkers/worker-bundle.js';
|
||||||
|
@ -20,9 +17,9 @@ if (process.env.NODE_ENV !== 'production') {
|
||||||
|
|
||||||
class ComicBookViewer extends React.PureComponent<Props> {
|
class ComicBookViewer extends React.PureComponent<Props> {
|
||||||
render() {
|
render() {
|
||||||
const { downloadPath } = this.props.source || {};
|
const { source } = this.props || {};
|
||||||
// Archive source
|
// Archive source
|
||||||
const file = `file://${downloadPath}`;
|
const file = `file://${source}`;
|
||||||
// Villain options
|
// Villain options
|
||||||
const opts = {
|
const opts = {
|
||||||
theme: this.props.theme === 'dark' ? 'Dark' : 'Light',
|
theme: this.props.theme === 'dark' ? 'Dark' : 'Light',
|
||||||
|
|
Loading…
Add table
Reference in a new issue