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