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