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:
@@ -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');
|
||||||
|
Reference in New Issue
Block a user