1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

repair weixin lib search bug (#4173)

This commit is contained in:
杨顺强
2019-10-22 12:01:00 +08:00
committed by Daniel Pan
parent eab949c482
commit 0c8d221a45

View File

@@ -797,8 +797,13 @@ class LibContentView extends React.Component {
this.showFile(path);
} else {
let url = siteRoot + 'lib/' + item.repo_id + '/file' + Utils.encodePath(path);
let newWindow = window.open('about:blank');
newWindow.location.href = url;
let isWeChat = Utils.isWeChat();
if (!isWeChat) {
let newWindow = window.open('about:blank');
newWindow.location.href = url;
} else {
location.href = url;
}
}
}
} else {
@@ -806,8 +811,13 @@ class LibContentView extends React.Component {
this.showDir(path);
} else {
let url = siteRoot + 'lib/' + item.repo_id + '/file' + Utils.encodePath(path);
let newWindow = window.open('about:blank');
newWindow.location.href = url;
let isWeChat = Utils.isWeChat();
if (!isWeChat) {
let newWindow = window.open('about:blank');
newWindow.location.href = url;
} else {
location.href = url;
}
}
}
}
@@ -1069,6 +1079,7 @@ class LibContentView extends React.Component {
this.showColumnMarkdownFile(direntPath);
} else {
const url = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(direntPath);
let isWeChat = Utils.isWeChat();
if (!isWeChat) {
let newWindow = window.open('about:blank');