mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
Merge branch '7.0'
This commit is contained in:
@@ -12,6 +12,7 @@ import DeleteRepoDialog from '../../components/dialog/delete-repo-dialog';
|
||||
import Rename from '../rename';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import LibHistorySettingDialog from '../dialog/lib-history-setting-dialog';
|
||||
import toaster from '../toast';
|
||||
|
||||
const propTypes = {
|
||||
currentGroup: PropTypes.object,
|
||||
@@ -346,10 +347,16 @@ class SharedRepoListItem extends React.Component {
|
||||
if (this.state.isStarred) {
|
||||
seafileAPI.unstarItem(this.props.repo.repo_id, '/').then(() => {
|
||||
this.setState({isStarred: !this.state.isStarred});
|
||||
}).catch(error => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
});
|
||||
} else {
|
||||
seafileAPI.starItem(this.props.repo.repo_id, '/').then(() => {
|
||||
this.setState({isStarred: !this.state.isStarred});
|
||||
}).catch(error => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user