1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 07:08:55 +00:00

Optimize internal link dialog cod (#5466)

* optimize code

* optimize code
This commit is contained in:
杨顺强
2023-05-12 11:24:34 +08:00
committed by GitHub
parent d090dd0ec0
commit 87dc0289d1
11 changed files with 103 additions and 64 deletions

View File

@@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import { isPro, gettext, mediaUrl, siteRoot } from '../../utils/constants';
import InternalLinkDialog from '../dialog/internal-link-dialog';
import { InternalLinkOperation } from '../operations';
const propTypes = {
toggleStar: PropTypes.func.isRequired,
@@ -40,7 +40,7 @@ class FileInfo extends React.PureComponent {
aria-label={isStarred ? gettext('Unstar') : gettext('Star')}
onClick={this.toggleStar}>
</a>
<InternalLinkDialog repoID={repoID} path={filePath} />
<InternalLinkOperation repoID={repoID} path={filePath} />
{(isPro && isLocked) &&
<img className="file-locked-icon" width="16"
src={`${mediaUrl}img/file-locked-32.png`}