From f48b331a69b44c8865a16bf4d6fd5811a7f0fba9 Mon Sep 17 00:00:00 2001 From: btzr-io Date: Fri, 27 Jul 2018 19:54:06 -0600 Subject: [PATCH] minor fixes --- src/renderer/component/fileViewer/internal/player.jsx | 5 +++-- src/renderer/component/viewers/documentViewer.jsx | 2 +- src/renderer/component/viewers/docxViewer.jsx | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/renderer/component/fileViewer/internal/player.jsx b/src/renderer/component/fileViewer/internal/player.jsx index a470f52c6..748665bc4 100644 --- a/src/renderer/component/fileViewer/internal/player.jsx +++ b/src/renderer/component/fileViewer/internal/player.jsx @@ -188,16 +188,17 @@ class VideoPlayer extends React.PureComponent { renderFile() { // This is what render-media does with unplayable files - const { filename, downloadPath, contentType, mediaType } = this.props; + const { filename: fileName, downloadPath, contentType, mediaType } = this.props; toBlobURL(fs.createReadStream(downloadPath), contentType, (err, url) => { if (err) { this.setState({ unsupported: true }); return false; } - console.info(filename); + // File to render const fileSource = { + fileName, contentType, downloadPath, filePath: url, diff --git a/src/renderer/component/viewers/documentViewer.jsx b/src/renderer/component/viewers/documentViewer.jsx index aabd1ad96..efd4bac90 100644 --- a/src/renderer/component/viewers/documentViewer.jsx +++ b/src/renderer/component/viewers/documentViewer.jsx @@ -67,7 +67,7 @@ class DocumentViewer extends React.PureComponent { render() { const { error, loading } = this.state; const loadingMessage = __('Rendering document.'); - const errorMessage = __("Sorry looks like we can't load the document."); + const errorMessage = __("Sorry, looks like we can't load the document."); return (
diff --git a/src/renderer/component/viewers/docxViewer.jsx b/src/renderer/component/viewers/docxViewer.jsx index 225b3e0e3..040494200 100644 --- a/src/renderer/component/viewers/docxViewer.jsx +++ b/src/renderer/component/viewers/docxViewer.jsx @@ -28,7 +28,7 @@ class DocxViewer extends React.PureComponent { const options = { styleMap: [ - "p[style-name='Title'] => h1.title:fresh", + "p[style-name='Title'] => h1:fresh", "p[style-name='Heading 1'] => h1:fresh", "p[style-name='Heading 2'] => h2:fresh", "p[style-name='Heading 3'] => h3:fresh",