mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 07:55:36 +00:00
Merge branch '11.0'
This commit is contained in:
@@ -46,7 +46,7 @@ class CreateForder extends React.Component {
|
||||
if (!this.state.isSubmitBtnActive) {
|
||||
return;
|
||||
}
|
||||
let newName = this.state.childName;
|
||||
let newName = this.state.childName.trim();
|
||||
let { isValid, errMessage } = validateName(newName);
|
||||
if (!isValid) {
|
||||
this.setState({ errMessage });
|
||||
|
@@ -587,15 +587,23 @@ class DirentGridView extends React.Component {
|
||||
const path = Utils.encodePath(Utils.joinPath(this.props.path, name));
|
||||
const cacheBuster = new Date().getTime();
|
||||
const fileExt = name.substr(name.lastIndexOf('.') + 1).toLowerCase();
|
||||
const isGIF = fileExt === 'gif';
|
||||
const src = `${siteRoot}repo/${repoID}/raw${path}?t=${cacheBuster}`;
|
||||
|
||||
let thumbnail = '';
|
||||
const isGIF = fileExt === 'gif';
|
||||
if (repoEncrypted || isGIF) {
|
||||
thumbnail = src;
|
||||
thumbnail = `${siteRoot}repo/${repoID}/raw${path}?t=${cacheBuster}`;
|
||||
} 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,
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user