1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 03:11:07 +00:00

handle repo-update

This commit is contained in:
孙永强
2025-03-31 16:29:30 +08:00
parent b27198bf02
commit 6d32b4409b

View File

@@ -191,6 +191,22 @@ class LibContentView extends React.Component {
}
}
}
else if (data.type === 'repo-update') {
seafileAPI.listDir(this.props.repoID, this.state.path, { 'with_thumbnail': true }).then(res => {
const { dirent_list, user_perm: userPerm, dir_id: dirID } = res.data;
const direntList = Utils.sortDirents(dirent_list.map(item => new Dirent(item)), this.state.sortBy, this.state.sortOrder);
this.setState({
pathExist: true,
userPerm,
isDirentListLoading: false,
direntList,
dirID,
path: this.state.path,
isSessionExpired: false,
currentDirent: null,
});
});
}
};
UNSAFE_componentWillReceiveProps(nextProps) {