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

repair new draft bug (#2814)

This commit is contained in:
杨顺强
2019-01-11 11:31:28 +08:00
committed by Daniel Pan
parent 1e4ba68f7d
commit 8108810520

View File

@@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { isPro, enableFileComment, fileAuditEnabled, folderPermEnabled} from '../../utils/constants'; import { isPro, enableFileComment, fileAuditEnabled, folderPermEnabled} from '../../utils/constants';
import DirentMenuItem from './dirent-menu-item'; import DirentMenuItem from './dirent-menu-item';
import { Utils } from '../../utils/utils';
const propTypes = { const propTypes = {
dirent: PropTypes.object.isRequired, dirent: PropTypes.object.isRequired,
@@ -65,7 +66,9 @@ class DirentMenu extends React.Component {
menuList.push('Lock'); menuList.push('Lock');
} }
} }
if (Utils.isMarkdownFile(dirent.name)) {
menuList.push('New Draft'); menuList.push('New Draft');
}
menuList.push('Divider'); menuList.push('Divider');
if (enableFileComment) { if (enableFileComment) {
menuList.push('Comment'); menuList.push('Comment');