1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-27 23:56:18 +00:00

remove comment (#5650)

* remove comment

* remove useless third party lib

* remove comment
This commit is contained in:
Michael An
2023-09-18 18:15:54 +08:00
committed by GitHub
parent f7754fa2e1
commit 2a6aa4b4d4
31 changed files with 34 additions and 2570 deletions

View File

@@ -16,7 +16,6 @@ const propTypes = {
isSaving: PropTypes.bool,
needSave: PropTypes.bool,
toggleLockFile: PropTypes.func.isRequired,
toggleCommentPanel: PropTypes.func.isRequired,
toggleDetailsPanel: PropTypes.func.isRequired
};
@@ -27,7 +26,7 @@ const {
fileName,
canEditFile, err,
// fileEnc, // for 'edit', not undefined only for some kinds of files (e.g. text file)
canDownloadFile, enableComment
canDownloadFile,
} = window.app.pageOptions;
class FileToolbar extends React.Component {
@@ -106,12 +105,10 @@ class FileToolbar extends React.Component {
showShareBtn = true;
}
let canComment = enableComment;
const { isCustomPermission, customPermission } = this;
if (isCustomPermission) {
const { download_external_link } = customPermission.permission;
showShareBtn = download_external_link;
canComment = false;
}
return (
@@ -196,11 +193,6 @@ class FileToolbar extends React.Component {
<span className="fas fa-ellipsis-v"></span>
</DropdownToggle>
<DropdownMenu right={true}>
{canComment && (
<DropdownItem onClick={this.props.toggleCommentPanel}>
{gettext('Comment')}
</DropdownItem>
)}
{filePerm == 'rw' && (
<a href={`${siteRoot}repo/file_revisions/${repoID}/?p=${encodeURIComponent(filePath)}&referer=${encodeURIComponent(location.href)}`} className="dropdown-item">
{gettext('History')}
@@ -264,11 +256,6 @@ class FileToolbar extends React.Component {
</a>
</DropdownItem>
)}
{canComment && (
<DropdownItem onClick={this.props.toggleCommentPanel}>
{gettext('Comment')}
</DropdownItem>
)}
<DropdownItem onClick={this.props.toggleDetailsPanel}>{gettext('Details')}</DropdownItem>
</DropdownMenu>
</Dropdown>