1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-06 17:33:18 +00:00

added 'empty tip' for 'groups', linked devices', and 'favourites' pages

This commit is contained in:
llj
2019-06-11 14:11:10 +08:00
parent 56b813dcb9
commit 037d6422a2
6 changed files with 37 additions and 13 deletions

View File

@@ -3,6 +3,7 @@ import moment from 'moment';
import { seafileAPI } from '../../utils/seafile-api';
import { gettext, loginUrl } from '../../utils/constants';
import toaster from '../../components/toast';
import EmptyTip from '../../components/empty-tip';
class Content extends Component {
@@ -14,6 +15,13 @@ class Content extends Component {
} else if (errorMsg) {
return <p className="error text-center">{errorMsg}</p>;
} else {
const emptyTip = (
<EmptyTip>
<h2>{gettext("You do not have connected devices")}</h2>
<p>{gettext("Your clients (Desktop/Android/iOS) will be listed here.")}</p>
</EmptyTip>
);
const desktopThead = (
<thead>
<tr>
@@ -35,12 +43,12 @@ class Content extends Component {
</thead>
);
return (
return items.length ? (
<table>
{window.innerWidth >= 768 ? desktopThead : mobileThead}
<TableBody items={items} />
</table>
);
): emptyTip;
}
}
}