mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 23:48:47 +00:00
add pdf thumbnail (#6157)
Co-authored-by: 孙永强 <11704063+s-yongqiang@user.noreply.gitee.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
||||
import cookie from 'react-cookies';
|
||||
import moment from 'moment';
|
||||
import { navigate } from '@gatsbyjs/reach-router';
|
||||
import { gettext, siteRoot, username, enableVideoThumbnail } from '../../utils/constants';
|
||||
import { gettext, siteRoot, username, enableVideoThumbnail, enablePDFThumbnail } from '../../utils/constants';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import collabServer from '../../utils/collab-server';
|
||||
@@ -538,7 +538,7 @@ class LibContentView extends React.Component {
|
||||
|
||||
getThumbnails = (repoID, path, direntList) => {
|
||||
let items = direntList.filter((item) => {
|
||||
return (Utils.imageCheck(item.name) || (enableVideoThumbnail && Utils.videoCheck(item.name))) && !item.encoded_thumbnail_src;
|
||||
return (Utils.imageCheck(item.name) || (enableVideoThumbnail && Utils.videoCheck(item.name)) || (enablePDFThumbnail && Utils.pdfCheck(item.name))) && !item.encoded_thumbnail_src;
|
||||
});
|
||||
if (items.length == 0) {
|
||||
return ;
|
||||
|
Reference in New Issue
Block a user