1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-23 20:37:42 +00:00

update group in real time (#7141)

This commit is contained in:
Jerry Ren
2024-12-04 17:49:42 +08:00
committed by GitHub
parent 3a4db4bf70
commit 90764f9520
12 changed files with 305 additions and 75 deletions

View File

@@ -8,6 +8,8 @@ import Loading from '../../../components/loading';
import toaster from '../../../components/toast';
import EmptyTip from '../../../components/empty-tip';
import SharePermissionEditor from '../../../components/select-editor/share-permission-editor';
import EventBus from '../../common/event-bus';
import { EVENT_BUS_TYPE } from '../../common/event-bus-type';
const itemPropTypes = {
item: PropTypes.object.isRequired,
@@ -153,7 +155,9 @@ class RepoShareAdminGroupShares extends Component {
}
deleteItem = (item) => {
const eventBus = EventBus.getInstance();
seafileAPI.deleteShareToGroupItem(item.repo_id, item.path, 'group', item.share_to).then(res => {
eventBus.dispatch(EVENT_BUS_TYPE.UNSHARE_REPO_TO_GROUP, { repo_id: item.repo_id, group_id: item.share_to });
let items = this.state.items.filter(shareItem => {
return shareItem.path + shareItem.share_to !== item.path + item.share_to;
});