1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 16:10:26 +00:00

repair goto repo bug

This commit is contained in:
shanshuirenjia
2018-12-11 17:52:19 +08:00
parent 8efd8a45be
commit f1eb4c625f
7 changed files with 62 additions and 25 deletions

View File

@@ -2,6 +2,7 @@ import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import { Dropdown, DropdownMenu, DropdownToggle, DropdownItem } from 'reactstrap';
import { Link } from '@reach/router';
import { Utils } from '../../utils/utils';
import { gettext, siteRoot, isPro, username, folderPermEnabled } from '../../utils/constants';
@@ -91,7 +92,7 @@ class SharedRepoListItem extends React.Component {
});
//todo change to library; div-view is not compatibility
let libPath = `${siteRoot}#group/${currentGroup.id}/lib/${this.props.repo.repo_id}/`;
let libPath = `${siteRoot}library/${this.props.repo.repo_id}/`;
return { iconUrl, iconTitle, libPath };
}
@@ -269,7 +270,7 @@ class SharedRepoListItem extends React.Component {
return (
<tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.onMouseEnter} onMouseOver={this.onMouseOver} onMouseLeave={this.onMouseLeave}>
<td><img src={iconUrl} title={repo.iconTitle} alt={iconTitle} width="24" /></td>
<td><a href={libPath}>{repo.repo_name}</a></td>
<td><Link to={libPath}>{repo.repo_name}</Link></td>
<td>{this.state.isOperationShow && this.generatorPCMenu()}</td>
<td>{repo.size}</td>
<td title={moment(repo.last_modified).format('llll')}>{moment(repo.last_modified).fromNow()}</td>