mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-11 03:41:12 +00:00
Watch file changes (#5364)
* [my libraries] redesigned 'watch/unwatch file changes' - added 'watch file changes' & 'unwatch file changes' to the operation menu - added icon & tooltip for monitored libraries - added support for mobile * [my libs] updated 'watch/unwatch file changes' * [notifications] update for 'watch/unwatch file changes'
This commit is contained in:
@@ -112,6 +112,16 @@ class MyLibraries extends Component {
|
||||
this.setState({repoList: repoList});
|
||||
}
|
||||
|
||||
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});
|
||||
}
|
||||
|
||||
onDeleteRepo = (repo) => {
|
||||
let repoList = this.state.repoList.filter(item => {
|
||||
return item.repo_id !== repo.repo_id;
|
||||
@@ -168,6 +178,7 @@ class MyLibraries extends Component {
|
||||
onRenameRepo={this.onRenameRepo}
|
||||
onDeleteRepo={this.onDeleteRepo}
|
||||
onTransferRepo={this.onTransferRepo}
|
||||
onMonitorRepo={this.onMonitorRepo}
|
||||
onRepoClick={this.onRepoClick}
|
||||
sortRepoList={this.sortRepoList}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user