1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 10:58:33 +00:00

deleted repo page (#3221)

This commit is contained in:
Michael An
2019-04-08 18:04:56 +08:00
committed by Daniel Pan
parent 305eab811c
commit 243b6aedea
2 changed files with 9 additions and 4 deletions

View File

@@ -135,6 +135,10 @@
border-radius: 2px; border-radius: 2px;
} }
.cur-view-content .tip {
font-size: 14px;
}
.cur-view-detail { .cur-view-detail {
flex: 0 0 20rem; flex: 0 0 20rem;
display: flex; display: flex;

View File

@@ -6,6 +6,7 @@ import { seafileAPI } from '../../utils/seafile-api';
import toaster from '../../components/toast'; import toaster from '../../components/toast';
import CommonToolbar from '../../components/toolbar/common-toolbar'; import CommonToolbar from '../../components/toolbar/common-toolbar';
import Loading from '../../components/loading'; import Loading from '../../components/loading';
import { Utils } from '../../utils/utils';
moment.locale(lang); moment.locale(lang);
@@ -147,16 +148,16 @@ class DeletedRepoItem extends Component {
render() { render() {
let localTime = moment.utc(this.props.repo.del_time).toDate(); let localTime = moment.utc(this.props.repo.del_time).toDate();
localTime = moment(localTime).fromNow(); localTime = moment(localTime).fromNow();
let iconUrl = Utils.getLibIconUrl(this.props.repo);
return ( return (
<tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}> <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
<td className="text-center"><img src={siteRoot + 'media/img/lib/48/lib.png'} alt='' /></td> <td className="text-center"><img src={iconUrl} alt='' width="24" /></td>
<td className="name">{this.props.repo.repo_name}</td> <td className="name">{this.props.repo.repo_name}</td>
<td className="update">{localTime}</td> <td className="update">{localTime}</td>
<td> <td>
{this.state.highlight && ( <span onClick={this.restoreDeletedRepo} title={gettext('Restore')}
<a href="#" onClick={this.restoreDeletedRepo} className="op-icon sf2-icon-reply repo-share-btn" title={gettext('Restore')} aria-label={gettext('Restore')}></a> className={`sf2-icon-reply action-icon ${this.state.highlight ? '' : 'vh'}`}></span>
)}
</td> </td>
</tr> </tr>
); );