mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 07:41:26 +00:00
[repo/folder trash] rewrote it with react
This commit is contained in:
@@ -84,7 +84,7 @@ class DirTool extends React.Component {
|
||||
let { repoID, repoName, permission, currentPath } = this.props;
|
||||
let isFile = this.isMarkdownFile(currentPath);
|
||||
let name = Utils.getFileName(currentPath);
|
||||
let trashUrl = siteRoot + 'repo/recycle/' + repoID + '/?referer=' + encodeURIComponent(location.href);
|
||||
let trashUrl = siteRoot + 'repo/' + repoID + '/trash/';
|
||||
let historyUrl = siteRoot + 'repo/history/' + repoID + '/';
|
||||
if (permission) {
|
||||
if (isFile) { // isFile
|
||||
@@ -96,7 +96,7 @@ class DirTool extends React.Component {
|
||||
);
|
||||
} else {
|
||||
if (name) { // name not '' is not root path
|
||||
trashUrl = siteRoot + 'dir/recycle/' + repoID + '/?dir_path=' + encodeURIComponent(currentPath) + '&referer=' + encodeURIComponent(location.href);
|
||||
trashUrl = siteRoot + 'repo/' + repoID + '/trash/?path=' + encodeURIComponent(currentPath);
|
||||
return (
|
||||
<ul className="path-toolbar">
|
||||
<li className="toolbar-item"><a className="op-link sf2-icon-recycle" href={trashUrl} title={gettext('Trash')} aria-label={gettext('Trash')}></a></li>
|
||||
|
Reference in New Issue
Block a user