File viewer v2 #1826

Merged
btzr-io merged 17 commits from fix-viewer into master 2018-08-06 03:53:57 +02:00
3 changed files with 5 additions and 4 deletions
Showing only changes of commit f48b331a69 - Show all commits

View file

@ -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,

View file

@ -67,7 +67,7 @@ class DocumentViewer extends React.PureComponent<Props> {
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 (
<div className="file-render__viewer document-viewer">

View file

@ -28,7 +28,7 @@ class DocxViewer extends React.PureComponent<Props> {
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",