1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 01:41:39 +00:00

[misc] modification for mobile (#4016)

This commit is contained in:
llj
2019-08-22 20:23:08 +08:00
committed by Daniel Pan
parent 2b9257acf9
commit 9996db6f5f
19 changed files with 88 additions and 138 deletions

View File

@@ -114,11 +114,9 @@ class MylibRepoListItem extends React.Component {
if (this.state.isStarred) {
seafileAPI.unstarItem(this.props.repo.repo_id, '/').then(() => {
this.setState({isStarred: !this.state.isStarred});
if (window.innerWidth < 768) {
const msg = gettext('Successfully unstarred {library_name_placeholder}.')
.replace('{library_name_placeholder}', repoName);
toaster.success(msg);
}
}).catch(error => {
let errMessage = Utils.getErrorMsg(error);
toaster.danger(errMessage);
@@ -126,11 +124,9 @@ class MylibRepoListItem extends React.Component {
} else {
seafileAPI.starItem(this.props.repo.repo_id, '/').then(() => {
this.setState({isStarred: !this.state.isStarred});
if (window.innerWidth < 768) {
const msg = gettext('Successfully starred {library_name_placeholder}.')
.replace('{library_name_placeholder}', repoName);
toaster.success(msg);
}
}).catch(error => {
let errMessage = Utils.getErrorMsg(error);
toaster.danger(errMessage);