1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-23 12:27:48 +00:00

Merge branch '11.0'

This commit is contained in:
lian
2024-11-01 16:32:20 +08:00
13 changed files with 55 additions and 19 deletions

View File

@@ -187,15 +187,23 @@ class DirentListView extends React.Component {
const repoEncrypted = this.props.currentRepoInfo.encrypted;
const path = Utils.encodePath(Utils.joinPath(this.props.path, name));
const fileExt = name.substr(name.lastIndexOf('.') + 1).toLowerCase();
const isGIF = fileExt === 'gif';
const src = `${siteRoot}repo/${repoID}/raw${path}`;
let thumbnail = '';
const isGIF = fileExt === 'gif';
if (repoEncrypted || isGIF) {
thumbnail = src;
thumbnail = `${siteRoot}repo/${repoID}/raw${path}`;
} else {
thumbnail = `${siteRoot}thumbnail/${repoID}/${thumbnailSizeForOriginal}${path}`;
}
let src = '';
const isTIFF = fileExt == 'tiff';
if (isTIFF) {
src = `${siteRoot}thumbnail/${repoID}/${thumbnailSizeForOriginal}${path}`;
} else {
src = `${siteRoot}repo/${repoID}/raw${path}`;
}
return {
name,
thumbnail,