mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-02 07:47:32 +00:00
optimized code
This commit is contained in:
parent
4cbc72819e
commit
98de027e98
@ -93,7 +93,6 @@ class SharedRepoListItem extends React.Component {
|
||||
'permission': repo.permission
|
||||
});
|
||||
|
||||
//todo change to library; div-view is not compatibility
|
||||
let libPath = `${siteRoot}library/${repo.repo_id}/${Utils.encodePath(repo.repo_name)}/`;
|
||||
|
||||
return { iconUrl, iconTitle, libPath };
|
||||
@ -135,17 +134,14 @@ class SharedRepoListItem extends React.Component {
|
||||
}
|
||||
|
||||
onItemShare = () => {
|
||||
// todo
|
||||
this.setState({isShowSharedDialog: true});
|
||||
}
|
||||
|
||||
onItemUnshare = () => {
|
||||
// todo
|
||||
this.props.onItemUnshare(this.props.repo);
|
||||
}
|
||||
|
||||
onItemDelete = () => {
|
||||
// todo
|
||||
this.props.onItemDelete(this.props.repo);
|
||||
}
|
||||
|
||||
|
@ -191,6 +191,5 @@ const GroupsViewPropTypes = {
|
||||
};
|
||||
|
||||
GroupsView.propTypes = GroupsViewPropTypes;
|
||||
// Groups.propTypes = propTypes;
|
||||
|
||||
export default GroupsView;
|
||||
|
@ -147,7 +147,9 @@ export const Utils = {
|
||||
return encodeURIComponent(e);
|
||||
}).join('/');
|
||||
*/
|
||||
|
||||
if (!path) {
|
||||
return '';
|
||||
}
|
||||
var path_arr = path.split('/');
|
||||
var path_arr_ = [];
|
||||
for (var i = 0, len = path_arr.length; i < len; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user