import React, { Component } from 'react'; import { Link } from '@reach/router'; import { seafileAPI } from '../../utils/seafile-api'; import { Utils } from '../../utils/utils'; import { gettext, siteRoot, loginUrl, isPro } from '../../utils/constants'; import PermissionEditor from '../../components/permission-editor'; class Content extends Component { render() { const {loading, errorMsg, items} = this.props.data; if (loading) { return ; } else if (errorMsg) { return

{errorMsg}

; } else { const emptyTip = (

{gettext('You have not shared any libraries')}

{gettext("You can share libraries with your friends and colleagues by clicking the share icon of your own libraries in your home page or creating a new library in groups you are in.")}

); const table = (
{/*icon*/} {gettext("Name")} {/* TODO: sort by name */} {gettext("Share To")} {gettext("Permission")}
); return items.length ? table : emptyTip; } } } class TableBody extends Component { constructor(props) { super(props); this.state = { items: this.props.items }; } componentDidMount() { document.addEventListener('click', this.clickDocument); } clickDocument(e) { // TODO: click 'outside' to hide `