mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 07:01:12 +00:00
[video thumbnail] display the thumbnails for some pages.
- when 'video thumbnail' feature is enabled, display the thumbnails for 'dir view', 'starred(favorites)', 'file view', 'shared dir view' pages.
This commit is contained in:
@@ -24,7 +24,7 @@ let {
|
||||
repoID, relativePath,
|
||||
mode, thumbnailSize, zipped,
|
||||
trafficOverLimit, canDownload,
|
||||
noQuota, canUpload
|
||||
noQuota, canUpload, enableVideoThumbnail
|
||||
} = window.shared.pageOptions;
|
||||
|
||||
const showDownloadIcon = !trafficOverLimit && canDownload;
|
||||
@@ -90,7 +90,10 @@ class SharedDirView extends React.Component {
|
||||
|
||||
getThumbnails = () => {
|
||||
let items = this.state.items.filter((item) => {
|
||||
return !item.is_dir && Utils.imageCheck(item.file_name) && !item.encoded_thumbnail_src;
|
||||
return !item.is_dir &&
|
||||
(Utils.imageCheck(item.file_name) ||
|
||||
(enableVideoThumbnail && Utils.videoCheck(item.file_name))) &&
|
||||
!item.encoded_thumbnail_src;
|
||||
});
|
||||
if (items.length == 0) {
|
||||
return ;
|
||||
|
Reference in New Issue
Block a user