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

[group] added 'load more repos' (#4649)

This commit is contained in:
llj
2020-08-17 11:53:33 +08:00
committed by GitHub
parent e9c2e5c76e
commit 483c6fc5c3
2 changed files with 53 additions and 11 deletions

View File

@@ -1,10 +1,11 @@
import React, {Fragment} from 'react';
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { gettext } from '../../utils/constants';
import { Utils } from '../../utils/utils';
import SharedRepoListItem from './shared-repo-list-item';
import toaster from '../toast';
import LibsMobileThead from '../libs-mobile-thead';
import Loading from '../loading';
const propTypes = {
libraryType: PropTypes.string,
@@ -18,6 +19,7 @@ const propTypes = {
onItemDelete: PropTypes.func,
onItemDetails: PropTypes.func,
onItemRename: PropTypes.func,
hasNextPage: PropTypes.bool
};
class SharedRepoListView extends React.Component {
@@ -141,10 +143,16 @@ class SharedRepoListView extends React.Component {
}
render() {
if (Utils.isDesktop()) {
return this.renderPCUI();
const table = Utils.isDesktop() ? this.renderPCUI() : this.renderMobileUI();
if (this.props.hasNextPage) {
return (
<Fragment>
{table}
<Loading />
</Fragment>
);
} else {
return this.renderMobileUI();
return table;
}
}
}