1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 16:31:13 +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:
llj
2023-02-11 17:40:43 +08:00
committed by GitHub
parent 96c5a1d10b
commit f086d4705b
7 changed files with 252 additions and 70 deletions

View File

@@ -252,6 +252,16 @@ class GroupView 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});
}
onTabNavClick = (tabName) => {
this.props.onTabNavClick(tabName);
}
@@ -561,6 +571,7 @@ class GroupView extends React.Component {
onItemDelete={this.onItemDelete}
onItemDetails={this.onItemDetails}
onItemRename={this.onItemRename}
onMonitorRepo={this.onMonitorRepo}
/>
}
</div>