mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-30 00:41:24 +00:00
minor fixes
This commit is contained in:
parent
842fbcc668
commit
f48b331a69
3 changed files with 5 additions and 4 deletions
|
@ -188,16 +188,17 @@ class VideoPlayer extends React.PureComponent {
|
||||||
|
|
||||||
renderFile() {
|
renderFile() {
|
||||||
// This is what render-media does with unplayable files
|
// 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) => {
|
toBlobURL(fs.createReadStream(downloadPath), contentType, (err, url) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
this.setState({ unsupported: true });
|
this.setState({ unsupported: true });
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
console.info(filename);
|
|
||||||
// File to render
|
// File to render
|
||||||
const fileSource = {
|
const fileSource = {
|
||||||
|
fileName,
|
||||||
contentType,
|
contentType,
|
||||||
downloadPath,
|
downloadPath,
|
||||||
filePath: url,
|
filePath: url,
|
||||||
|
|
|
@ -67,7 +67,7 @@ class DocumentViewer extends React.PureComponent<Props> {
|
||||||
render() {
|
render() {
|
||||||
const { error, loading } = this.state;
|
const { error, loading } = this.state;
|
||||||
const loadingMessage = __('Rendering document.');
|
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 (
|
return (
|
||||||
<div className="file-render__viewer document-viewer">
|
<div className="file-render__viewer document-viewer">
|
||||||
|
|
|
@ -28,7 +28,7 @@ class DocxViewer extends React.PureComponent<Props> {
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
styleMap: [
|
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 1'] => h1:fresh",
|
||||||
"p[style-name='Heading 2'] => h2:fresh",
|
"p[style-name='Heading 2'] => h2:fresh",
|
||||||
"p[style-name='Heading 3'] => h3:fresh",
|
"p[style-name='Heading 3'] => h3:fresh",
|
||||||
|
|
Loading…
Add table
Reference in a new issue