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

[share dialog] 'share link' panel: added 'empty tip' & etc. (#5423)

This commit is contained in:
llj
2023-04-04 18:07:27 +08:00
committed by GitHub
parent b79a46fde1
commit dce6670c61

View File

@@ -6,6 +6,7 @@ import { Utils } from '../../utils/utils';
import ShareLink from '../../models/share-link';
import toaster from '../toast';
import Loading from '../loading';
import EmptyTip from '../empty-tip';
import LinkDetails from './link-details';
import LinkItem from './link-item';
import LinkCreation from './link-creation';
@@ -103,7 +104,7 @@ class ShareLinkPanel extends React.Component {
sharedLinkInfo: null,
shareLinks: shareLinks.filter(item => item.token !== sharedLinkInfo.token)
});
toaster.success(gettext('The link was deleted.'));
toaster.success(gettext('Link deleted'));
}).catch((error) => {
let errMessage = Utils.getErrorMsg(error);
toaster.danger(errMessage);
@@ -188,7 +189,11 @@ class ShareLinkPanel extends React.Component {
<button className="btn btn-sm btn-outline-primary" onClick={this.setMode.bind(this, 'linksCreation')}>{gettext('Generate links in batch')}</button>
</div>
</div>
{shareLinks.length > 0 && (
{shareLinks.length == 0 ? (
<EmptyTip forDialog={true}>
<p className="text-secondary">{gettext('No share links')}</p>
</EmptyTip>
) : (
<table className="table-hover">
<thead>
<tr>