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

revision url (#5558)

* revision url

* update revision_id
This commit is contained in:
欢乐马
2023-07-24 10:47:12 +08:00
committed by GitHub
parent 6ce5fbbdef
commit c31334d657
13 changed files with 215 additions and 25 deletions

View File

@@ -1264,7 +1264,10 @@ class LibContentView extends React.Component {
if (this.state.currentMode === 'column' && Utils.isMarkdownFile(direntPath)) {
this.showColumnMarkdownFile(direntPath);
} else {
const url = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(direntPath);
let url = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(direntPath);
if (dirent.is_sdoc_revision && dirent.revision_id) {
url = siteRoot + 'lib/' + repoID + '/revisions/' + dirent.revision_id + '/';
}
let isWeChat = Utils.isWeChat();
if (!isWeChat) {
@@ -1633,7 +1636,11 @@ class LibContentView extends React.Component {
this.showColumnMarkdownFile(node.path);
}
} else {
const url = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(node.path);
let url = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(node.path);
let dirent = node.object;
if (dirent.is_sdoc_revision && dirent.revision_id) {
url = siteRoot + 'lib/' + repoID + '/revisions/' + dirent.revision_id + '/';
}
window.open(url);
}
}