1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 16:10:26 +00:00

Prop type check repair (#2919)

* repair intent check wraning

* change doublequote to singlequote, add semicolon

* optimized code

* modify type-check wraning
This commit is contained in:
杨顺强
2019-01-31 17:37:02 +08:00
committed by Daniel Pan
parent 06f25f05f2
commit e57701fa38
74 changed files with 714 additions and 700 deletions

View File

@@ -1,6 +1,6 @@
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem} from 'reactstrap'
import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem} from 'reactstrap';
import { seafileAPI } from '../../utils/seafile-api';
import { gettext, loginUrl } from '../../utils/constants';
import { Utils } from '../../utils/utils';
@@ -33,7 +33,7 @@ class PublicSharedView extends React.Component {
isCreateMenuShow: false,
isCreateRepoDialogShow: false,
isSelectRepoDialpgShow: false,
}
};
}
componentDidMount() {
@@ -51,19 +51,19 @@ class PublicSharedView extends React.Component {
if (error.response.status == 403) {
this.setState({
isLoading: false,
errMessage: gettext("Permission denied")
errMessage: gettext('Permission denied')
});
location.href = `${loginUrl}?next=${encodeURIComponent(location.href)}`;
} else {
this.setState({
isLoading: false,
errMessage: gettext("Error")
errMessage: gettext('Error')
});
}
} else {
this.setState({
isLoading: false,
errMessage: gettext("Please check the network.")
errMessage: gettext('Please check the network.')
});
}
});
@@ -80,14 +80,14 @@ class PublicSharedView extends React.Component {
owner_email: res.data.owner,
mtime: res.data.mtime,
encrypted: res.data.encrypted,
}
};
let repo = new Repo(object);
let repoList = this.addRepoItem(repo);
this.setState({repoList: repoList});
this.onCreateRepoToggle();
}).catch(() => {
// todo
})
});
}
onRepoSelectedHandler = (selectedRepoList) => {
@@ -98,7 +98,7 @@ class PublicSharedView extends React.Component {
}).catch(() => {
// todo
});
})
});
}
onItemUnshare = (repo) => {
@@ -185,7 +185,7 @@ class PublicSharedView extends React.Component {
<div className="main-panel-center">
<div className="cur-view-container">
<div className="cur-view-path">
<h3 className="sf-heading">{gettext("Shared with all")}</h3>
<h3 className="sf-heading">{gettext('Shared with all')}</h3>
</div>
<div className="cur-view-content">
{this.state.isLoading && <Loading />}