mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-22 20:08:19 +00:00
modify lib-deleted-ui
This commit is contained in:
@@ -4,7 +4,6 @@ import { gettext, siteRoot, lang } from '../../utils/constants';
|
|||||||
import { seafileAPI } from '../../utils/seafile-api';
|
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 classnames from 'classnames';
|
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
moment.locale(lang);
|
moment.locale(lang);
|
||||||
|
|
||||||
@@ -104,7 +103,7 @@ class DeletedRepoItem extends Component {
|
|||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
hideRestoreMenu: true,
|
hideRestoreMenu: true,
|
||||||
highlight: '',
|
highlight: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +111,7 @@ class DeletedRepoItem extends Component {
|
|||||||
if (!this.props.isItemFreezed) {
|
if (!this.props.isItemFreezed) {
|
||||||
this.setState({
|
this.setState({
|
||||||
hideRestoreMenu: false,
|
hideRestoreMenu: false,
|
||||||
highlight: 'tr-highlight'
|
highlight: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -121,7 +120,7 @@ class DeletedRepoItem extends Component {
|
|||||||
if (!this.props.isItemFreezed) {
|
if (!this.props.isItemFreezed) {
|
||||||
this.setState({
|
this.setState({
|
||||||
hideRestoreMenu: true,
|
hideRestoreMenu: true,
|
||||||
highlight: ''
|
highlight: false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -144,11 +143,15 @@ class DeletedRepoItem extends Component {
|
|||||||
localTime = moment(localTime).fromNow();
|
localTime = moment(localTime).fromNow();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<tr className={this.state.highlight} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
|
<tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
|
||||||
<td className="icon"><img src={siteRoot + 'media/img/lib/48/lib.png'} alt='icon' /></td>
|
<td className="icon"><img src={siteRoot + 'media/img/lib/48/lib.png'} alt='icon' /></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 className={classnames({hide: this.state.hideRestoreMenu})}><i onClick={this.restoreDeletedRepo} className="fas fa-reply"></i></td>
|
<td>
|
||||||
|
{this.state.highlight && (
|
||||||
|
<a href="#" onClick={this.restoreDeletedRepo} className="sf2-icon-reply sf2-x repo-share-btn op-icon"></a>
|
||||||
|
)}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -80,6 +80,7 @@
|
|||||||
.sf2-icon-list-view:before { content:"\e026"; }
|
.sf2-icon-list-view:before { content:"\e026"; }
|
||||||
.sf2-icon-copy:before {content:"\e028"}
|
.sf2-icon-copy:before {content:"\e028"}
|
||||||
.sf2-icon-move:before {content:"\e029"}
|
.sf2-icon-move:before {content:"\e029"}
|
||||||
|
.sf2-icon-reply:before { content:"\e02a"; }
|
||||||
.sf2-icon-menu:before { content: "\e031"; }
|
.sf2-icon-menu:before { content: "\e031"; }
|
||||||
.sf2-icon-more:before { content: "\e032"; }
|
.sf2-icon-more:before { content: "\e032"; }
|
||||||
.sf2-icon-x3:before {content:"\e035";}
|
.sf2-icon-x3:before {content:"\e035";}
|
||||||
@@ -143,10 +144,6 @@ ul,ol,li {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-direction-row {
|
|
||||||
flex-direction: row;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sf-font {
|
.sf-font {
|
||||||
color: #eb8205 !important;
|
color: #eb8205 !important;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
Reference in New Issue
Block a user