mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
unStarItem -> unstarItem (#3181)
This commit is contained in:
@@ -111,7 +111,7 @@ class DirentListItem extends React.Component {
|
||||
let filePath = this.getDirentPath(dirent);
|
||||
|
||||
if (dirent.starred) {
|
||||
seafileAPI.unStarItem(repoID, filePath).then(() => {
|
||||
seafileAPI.unstarItem(repoID, filePath).then(() => {
|
||||
this.props.updateDirent(this.props.dirent, 'starred', false);
|
||||
});
|
||||
} else {
|
||||
|
@@ -37,7 +37,7 @@ class FileView extends React.Component {
|
||||
|
||||
toggleStar = () => {
|
||||
if (this.state.isStarred) {
|
||||
seafileAPI.unStarItem(repoID, filePath).then((res) => {
|
||||
seafileAPI.unstarItem(repoID, filePath).then((res) => {
|
||||
this.setState({
|
||||
isStarred: false
|
||||
});
|
||||
|
@@ -327,7 +327,7 @@ class SharedRepoListItem extends React.Component {
|
||||
|
||||
onStarRepo = () => {
|
||||
if (this.state.isStarred) {
|
||||
seafileAPI.unStarItem(this.props.repo.repo_id, '/').then(() => {
|
||||
seafileAPI.unstarItem(this.props.repo.repo_id, '/').then(() => {
|
||||
this.setState({isStarred: !this.state.isStarred});
|
||||
});
|
||||
} else {
|
||||
|
@@ -62,9 +62,9 @@ class EditorUtilities {
|
||||
);
|
||||
}
|
||||
|
||||
unStarItem () {
|
||||
unstarItem () {
|
||||
return (
|
||||
seafileAPI.unStarItem(this.repoID, this.filePath)
|
||||
seafileAPI.unstarItem(this.repoID, this.filePath)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -650,7 +650,7 @@ class MarkdownEditor extends React.Component {
|
||||
toggleStar = () => {
|
||||
let starrd = this.state.fileInfo.starred;
|
||||
if (starrd) {
|
||||
editorUtilities.unStarItem().then((response) => {
|
||||
editorUtilities.unstarItem().then((response) => {
|
||||
this.setState({
|
||||
fileInfo: Object.assign({}, this.state.fileInfo, {starred: !starrd})
|
||||
});
|
||||
|
@@ -107,7 +107,7 @@ class MylibRepoListItem extends React.Component {
|
||||
|
||||
onStarRepo = () => {
|
||||
if (this.state.isStarred) {
|
||||
seafileAPI.unStarItem(this.props.repo.repo_id, '/').then(() => {
|
||||
seafileAPI.unstarItem(this.props.repo.repo_id, '/').then(() => {
|
||||
this.setState({isStarred: !this.state.isStarred});
|
||||
});
|
||||
} else {
|
||||
|
@@ -181,7 +181,7 @@ class Item extends Component {
|
||||
|
||||
onStarRepo = () => {
|
||||
if (this.state.isStarred) {
|
||||
seafileAPI.unStarItem(this.props.data.repo_id, '/').then(() => {
|
||||
seafileAPI.unstarItem(this.props.data.repo_id, '/').then(() => {
|
||||
this.setState({isStarred: !this.state.isStarred});
|
||||
});
|
||||
} else {
|
||||
|
@@ -143,7 +143,7 @@ class Item extends Component {
|
||||
e.preventDefault();
|
||||
|
||||
const data = this.props.data;
|
||||
seafileAPI.unStarItem(data.repo_id, data.path).then((res) => {
|
||||
seafileAPI.unstarItem(data.repo_id, data.path).then((res) => {
|
||||
this.setState({
|
||||
unstarred: true
|
||||
});
|
||||
|
Reference in New Issue
Block a user