mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 17:33:18 +00:00
[share dialog] 'share link' panel: added 'empty tip' & etc. (#5423)
This commit is contained in:
@@ -6,6 +6,7 @@ import { Utils } from '../../utils/utils';
|
|||||||
import ShareLink from '../../models/share-link';
|
import ShareLink from '../../models/share-link';
|
||||||
import toaster from '../toast';
|
import toaster from '../toast';
|
||||||
import Loading from '../loading';
|
import Loading from '../loading';
|
||||||
|
import EmptyTip from '../empty-tip';
|
||||||
import LinkDetails from './link-details';
|
import LinkDetails from './link-details';
|
||||||
import LinkItem from './link-item';
|
import LinkItem from './link-item';
|
||||||
import LinkCreation from './link-creation';
|
import LinkCreation from './link-creation';
|
||||||
@@ -103,7 +104,7 @@ class ShareLinkPanel extends React.Component {
|
|||||||
sharedLinkInfo: null,
|
sharedLinkInfo: null,
|
||||||
shareLinks: shareLinks.filter(item => item.token !== sharedLinkInfo.token)
|
shareLinks: shareLinks.filter(item => item.token !== sharedLinkInfo.token)
|
||||||
});
|
});
|
||||||
toaster.success(gettext('The link was deleted.'));
|
toaster.success(gettext('Link deleted'));
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
let errMessage = Utils.getErrorMsg(error);
|
let errMessage = Utils.getErrorMsg(error);
|
||||||
toaster.danger(errMessage);
|
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>
|
<button className="btn btn-sm btn-outline-primary" onClick={this.setMode.bind(this, 'linksCreation')}>{gettext('Generate links in batch')}</button>
|
||||||
</div>
|
</div>
|
||||||
</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">
|
<table className="table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
Reference in New Issue
Block a user