mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 19:08:21 +00:00
show history when select folder (#6318)
This commit is contained in:
@@ -7,13 +7,12 @@ import TreeSection from '../tree-section';
|
|||||||
const DirOthers = ({ userPerm, repoID, currentPath }) => {
|
const DirOthers = ({ userPerm, repoID, currentPath }) => {
|
||||||
|
|
||||||
let trashUrl = null;
|
let trashUrl = null;
|
||||||
let historyUrl = null;
|
const historyUrl = siteRoot + 'repo/history/' + repoID + '/';
|
||||||
if (userPerm === 'rw' && !Utils.isMarkdownFile(currentPath)) {
|
if (userPerm === 'rw' && !Utils.isMarkdownFile(currentPath)) {
|
||||||
if (Utils.getFileName(currentPath)) {
|
if (Utils.getFileName(currentPath)) {
|
||||||
trashUrl = siteRoot + 'repo/' + repoID + '/trash/?path=' + encodeURIComponent(currentPath);
|
trashUrl = siteRoot + 'repo/' + repoID + '/trash/?path=' + encodeURIComponent(currentPath);
|
||||||
} else {
|
} else {
|
||||||
trashUrl = siteRoot + 'repo/' + repoID + '/trash/';
|
trashUrl = siteRoot + 'repo/' + repoID + '/trash/';
|
||||||
historyUrl = siteRoot + 'repo/history/' + repoID + '/';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,7 +28,6 @@ const DirOthers = ({ userPerm, repoID, currentPath }) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{historyUrl &&
|
|
||||||
<div className='tree-node-inner text-nowrap' title={gettext('History')} onClick={() => location.href = historyUrl}>
|
<div className='tree-node-inner text-nowrap' title={gettext('History')} onClick={() => location.href = historyUrl}>
|
||||||
<div className="tree-node-text">{gettext('History')}</div>
|
<div className="tree-node-text">{gettext('History')}</div>
|
||||||
<div className="left-icon">
|
<div className="left-icon">
|
||||||
@@ -38,7 +36,6 @@ const DirOthers = ({ userPerm, repoID, currentPath }) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
|
||||||
</TreeSection>
|
</TreeSection>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user