1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 17:02:47 +00:00

Merge branch '7.1' into master

This commit is contained in:
lian
2020-12-30 11:09:05 +08:00
7 changed files with 247 additions and 31 deletions

View File

@@ -1176,8 +1176,7 @@ class LibContentView extends React.Component {
let isWeChat = Utils.isWeChat();
if (!isWeChat) {
let newWindow = window.open('about:blank');
newWindow.location.href = url;
window.open(url);
} else {
location.href = url;
}
@@ -1535,9 +1534,8 @@ class LibContentView extends React.Component {
this.showColumnMarkdownFile(node.path);
}
} else {
const w = window.open('about:blank');
const url = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(node.path);
w.location.href = url;
window.open(url);
}
}
}
@@ -1546,6 +1544,7 @@ class LibContentView extends React.Component {
let repoID = this.props.repoID;
seafileAPI.getFileInfo(repoID, filePath).then((res) => {
if (res.data.size === 0) {
// loading of asynchronously obtained data may be blocked
const w = window.open('about:blank');
const url = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(filePath);
w.location.href = url;