mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 15:53:28 +00:00
Monitor shared repos (#5375)
* [shared with me] added 'watch/unwatch file changes' for libraries * [groups, group] added 'watch/unwatch file changes' for libraries * [shared with me] only libraries shared with 'r', 'rw' permissions can be monitored * [groups, group] only libraries shared with 'r', 'rw' permissions can be monitored * [shared with me] improved the interaction for library items * [groups, group] cleaned up the code
This commit is contained in:
@@ -75,6 +75,16 @@ class RepoListViewPanel extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
onMonitorRepo = (repo, monitored) => {
|
||||
let repoList = this.state.repoList.map(item => {
|
||||
if (item.repo_id === repo.repo_id) {
|
||||
item.monitored = monitored;
|
||||
}
|
||||
return item;
|
||||
});
|
||||
this.setState({repoList: repoList});
|
||||
}
|
||||
|
||||
render() {
|
||||
let group = this.props.group;
|
||||
const emptyTip = <p className="group-item-empty-tip">{gettext('No libraries')}</p>;
|
||||
@@ -94,6 +104,7 @@ class RepoListViewPanel extends React.Component {
|
||||
onItemDelete={this.onItemDelete}
|
||||
onItemDetails={this.props.onItemDetails}
|
||||
onItemRename={this.onItemRename}
|
||||
onMonitorRepo={this.onMonitorRepo}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user