mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 23:48:47 +00:00
Modify some naming conventions
This commit is contained in:
@@ -67,8 +67,8 @@ const propTypes = {
|
||||
onItemsCopy: PropTypes.func.isRequired,
|
||||
onItemsDelete: PropTypes.func.isRequired,
|
||||
onFileTagChanged: PropTypes.func,
|
||||
scrollPage: PropTypes.func.isRequired,
|
||||
isCurrentPage: PropTypes.bool.isRequired,
|
||||
onPageScroll: PropTypes.func.isRequired,
|
||||
itemShownLimit: PropTypes.bool.isRequired,
|
||||
};
|
||||
|
||||
class DirColumnView extends React.Component {
|
||||
@@ -226,8 +226,8 @@ class DirColumnView extends React.Component {
|
||||
onItemsCopy={this.props.onItemsCopy}
|
||||
onItemsDelete={this.props.onItemsDelete}
|
||||
onFileTagChanged={this.props.onFileTagChanged}
|
||||
isCurrentPage={this.props.isCurrentPage}
|
||||
scrollPage={this.props.scrollPage}
|
||||
itemShownLimit={this.props.itemShownLimit}
|
||||
onPageScroll={this.props.onPageScroll}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
@@ -30,8 +30,8 @@ const propTypes = {
|
||||
showDirentDetail: PropTypes.func.isRequired,
|
||||
onAddFolder: PropTypes.func.isRequired,
|
||||
onFileTagChanged: PropTypes.func,
|
||||
scrollPage: PropTypes.func.isRequired,
|
||||
isCurrentPage: PropTypes.bool.isRequired
|
||||
onPageScroll: PropTypes.func.isRequired,
|
||||
itemShownLimit: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
class DirGridView extends React.Component {
|
||||
@@ -80,8 +80,8 @@ class DirGridView extends React.Component {
|
||||
isDirentDetailShow={this.props.isDirentDetailShow}
|
||||
onItemRename={this.props.onItemRename}
|
||||
onAddFolder={this.props.onAddFolder}
|
||||
isCurrentPage={this.props.isCurrentPage}
|
||||
scrollPage={this.props.scrollPage}
|
||||
itemShownLimit={this.props.itemShownLimit}
|
||||
onPageScroll={this.props.onPageScroll}
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
|
@@ -38,8 +38,8 @@ const propTypes = {
|
||||
onItemsCopy: PropTypes.func.isRequired,
|
||||
onItemsDelete: PropTypes.func.isRequired,
|
||||
onFileTagChanged: PropTypes.func,
|
||||
scrollPage: PropTypes.func.isRequired,
|
||||
isCurrentPage: PropTypes.bool.isRequired
|
||||
onPageScroll: PropTypes.func.isRequired,
|
||||
itemShownLimit: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
class DirListView extends React.Component {
|
||||
@@ -99,8 +99,8 @@ class DirListView extends React.Component {
|
||||
onAddFile={this.props.onAddFile}
|
||||
onAddFolder={this.props.onAddFolder}
|
||||
onFileTagChanged={this.props.onFileTagChanged}
|
||||
isCurrentPage={this.props.isCurrentPage}
|
||||
scrollPage={this.props.scrollPage}
|
||||
itemShownLimit={this.props.itemShownLimit}
|
||||
onPageScroll={this.props.onPageScroll}
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
|
@@ -40,8 +40,8 @@ const propTypes = {
|
||||
isDirentDetailShow: PropTypes.bool.isRequired,
|
||||
onGridItemClick: PropTypes.func,
|
||||
onAddFolder: PropTypes.func.isRequired,
|
||||
scrollPage: PropTypes.func.isRequired,
|
||||
isCurrentPage: PropTypes.bool.isRequired
|
||||
onPageScroll: PropTypes.func.isRequired,
|
||||
itemShownLimit: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
class DirentGridView extends React.Component{
|
||||
@@ -73,8 +73,8 @@ class DirentGridView extends React.Component{
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (!this.props.isCurrentPage) {
|
||||
this.setState({itemIdex: 100})
|
||||
if (this.props.itemShownLimit) {
|
||||
this.setState({itemIdex: 100});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ class DirentGridView extends React.Component{
|
||||
itemIdex += 100
|
||||
this.setState({itemIdex: itemIdex})
|
||||
}
|
||||
this.props.scrollPage();
|
||||
this.props.onPageScroll();
|
||||
}
|
||||
|
||||
onMoveToggle = () => {
|
||||
|
@@ -45,8 +45,8 @@ const propTypes = {
|
||||
onItemsCopy: PropTypes.func.isRequired,
|
||||
onItemsDelete: PropTypes.func.isRequired,
|
||||
onFileTagChanged: PropTypes.func,
|
||||
scrollPage: PropTypes.func.isRequired,
|
||||
isCurrentPage: PropTypes.bool.isRequired,
|
||||
onPageScroll: PropTypes.func.isRequired,
|
||||
itemShownLimit: PropTypes.bool.isRequired,
|
||||
};
|
||||
|
||||
class DirentListView extends React.Component {
|
||||
@@ -86,7 +86,7 @@ class DirentListView extends React.Component {
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (!this.props.isCurrentPage) {
|
||||
if (this.props.itemShownLimit) {
|
||||
this.setState({itemIdex: 100})
|
||||
}
|
||||
}
|
||||
@@ -155,7 +155,7 @@ class DirentListView extends React.Component {
|
||||
itemIdex += 100
|
||||
this.setState({itemIdex: itemIdex})
|
||||
}
|
||||
this.props.scrollPage();
|
||||
this.props.onPageScroll();
|
||||
}
|
||||
|
||||
// for image popup
|
||||
|
@@ -85,8 +85,8 @@ const propTypes = {
|
||||
showDirentDetail: PropTypes.func.isRequired,
|
||||
onDeleteRepoTag: PropTypes.func.isRequired,
|
||||
updateDetail: PropTypes.bool.isRequired,
|
||||
scrollPage: PropTypes.func.isRequired,
|
||||
isCurrentPage: PropTypes.bool.isRequired
|
||||
onPageScroll: PropTypes.func.isRequired,
|
||||
itemShownLimit: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
class LibContentContainer extends React.Component {
|
||||
@@ -206,8 +206,8 @@ class LibContentContainer extends React.Component {
|
||||
onItemsCopy={this.props.onItemsCopy}
|
||||
onItemsDelete={this.props.onItemsDelete}
|
||||
onFileTagChanged={this.props.onFileTagChanged}
|
||||
isCurrentPage={this.props.isCurrentPage}
|
||||
scrollPage={this.props.scrollPage}
|
||||
itemShownLimit={this.props.itemShownLimit}
|
||||
onPageScroll={this.props.onPageScroll}
|
||||
/>
|
||||
)}
|
||||
{this.props.currentMode === 'grid' && (
|
||||
@@ -239,8 +239,8 @@ class LibContentContainer extends React.Component {
|
||||
isDirentDetailShow={this.props.isDirentDetailShow}
|
||||
onItemRename={this.props.onItemRename}
|
||||
onFileTagChanged={this.props.onFileTagChanged}
|
||||
isCurrentPage={this.props.isCurrentPage}
|
||||
scrollPage={this.props.scrollPage}
|
||||
itemShownLimit={this.props.itemShownLimit}
|
||||
onPageScroll={this.props.onPageScroll}
|
||||
/>
|
||||
)}
|
||||
{this.props.currentMode === 'column' && (
|
||||
@@ -301,8 +301,8 @@ class LibContentContainer extends React.Component {
|
||||
onItemsCopy={this.props.onItemsCopy}
|
||||
onItemsDelete={this.props.onItemsDelete}
|
||||
onFileTagChanged={this.props.onFileTagChanged}
|
||||
isCurrentPage={this.props.isCurrentPage}
|
||||
scrollPage={this.props.scrollPage}
|
||||
itemShownLimit={this.props.itemShownLimit}
|
||||
onPageScroll={this.props.onPageScroll}
|
||||
/>
|
||||
)}
|
||||
</Fragment>
|
||||
|
@@ -71,7 +71,7 @@ class LibContentView extends React.Component {
|
||||
errorMsg: '',
|
||||
isDirentDetailShow: false,
|
||||
updateDetail: false,
|
||||
isCurrentPage: true,
|
||||
itemShownLimit: false,
|
||||
};
|
||||
|
||||
window.onpopstate = this.onpopstate;
|
||||
@@ -403,7 +403,7 @@ class LibContentView extends React.Component {
|
||||
if (!this.state.repoEncrypted && direntList.length) {
|
||||
this.getThumbnails(repoID, path, this.state.direntList);
|
||||
}
|
||||
this.switchPage();
|
||||
this.onSwitchPage();
|
||||
}).catch(() => {
|
||||
this.setState({
|
||||
isDirentListLoading: false,
|
||||
@@ -412,12 +412,12 @@ class LibContentView extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
scrollPage = () => {
|
||||
this.setState({isCurrentPage: true})
|
||||
onPageScroll = () => {
|
||||
this.setState({itemShownLimit: false})
|
||||
}
|
||||
|
||||
switchPage = () => {
|
||||
this.setState({isCurrentPage: false})
|
||||
onSwitchPage = () => {
|
||||
this.setState({itemShownLimit: true})
|
||||
}
|
||||
|
||||
getThumbnails = (repoID, path, direntList) => {
|
||||
@@ -1461,8 +1461,8 @@ class LibContentView extends React.Component {
|
||||
onDeleteRepoTag={this.onDeleteRepoTag}
|
||||
onToolbarFileTagChanged={this.onToolbarFileTagChanged}
|
||||
updateDetail={this.state.updateDetail}
|
||||
isCurrentPage={this.state.isCurrentPage}
|
||||
scrollPage={this.scrollPage}
|
||||
itemShownLimit={this.state.itemShownLimit}
|
||||
onPageScroll={this.onPageScroll}
|
||||
/>
|
||||
{this.state.pathExist && !this.state.isViewFile && (
|
||||
<FileUploader
|
||||
|
Reference in New Issue
Block a user