1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 10:22:46 +00:00

repair visit file history bug

This commit is contained in:
shanshuirenjia
2021-08-31 11:28:39 +08:00
parent 4ace0c4061
commit e34e26cab5
2 changed files with 3 additions and 3 deletions

View File

@@ -46,8 +46,8 @@ class HistoryItem extends React.Component {
let item = this.props.item;
let downloadUrl = URLDecorator.getUrl({type: 'download_historic_file', filePath: filePath, objID: item.rev_file_id});
let userProfileURL = `${siteRoot}profile/${encodeURIComponent(item.creator_email)}/`;
let viewUrl = `${siteRoot}repo/${historyRepoID}/history/files/?obj_id=${item.rev_file_id}&commit_id=${item.commit_id}&p=${filePath}`;
let diffUrl = `${siteRoot}repo/text_diff/${historyRepoID}/?commit=${item.commit_id}&p=${filePath}`;
let viewUrl = `${siteRoot}repo/${historyRepoID}/history/files/?obj_id=${item.rev_file_id}&commit_id=${item.commit_id}&p=${Utils.encodePath(filePath)}`;
let diffUrl = `${siteRoot}repo/text_diff/${historyRepoID}/?commit=${item.commit_id}&p=${Utils.encodePath(filePath)}`;
return (
<Fragment>
<tr onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave} className={this.state.active ? 'tr-highlight' : ''}>

View File

@@ -7,7 +7,7 @@ class URLDecorator {
let params = '';
switch (options.type) {
case 'download_historic_file':
params = 'p=' + options.filePath;
params = 'p=' + Utils.encodePath(options.filePath);
url = siteRoot + 'repo/' + historyRepoID + '/' + options.objID + '/download?' + params;
break;
case 'download_file_url':