1
0
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:
lian
2019-03-27 11:28:00 +08:00
committed by Daniel Pan
parent 4a9cfe8a46
commit 99b4ba8cd6
7 changed files with 9 additions and 9 deletions

View File

@@ -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 {

View File

@@ -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
});

View File

@@ -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 {

View File

@@ -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})
});

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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
});