1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 02:42:47 +00:00

fix selected file menu (#3218)

This commit is contained in:
Michael An
2019-04-08 15:40:25 +08:00
committed by Daniel Pan
parent 5f350de460
commit affc6f3402

View File

@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Utils } from '../../utils/utils';
import { Dropdown, DropdownMenu, DropdownToggle, DropdownItem, ButtonDropdown } from 'reactstrap';
import { gettext, isPro, enableFileComment, fileAuditEnabled, folderPermEnabled } from '../../utils/constants';
import '../../css/dirents-menu.css';
@@ -31,6 +32,9 @@ class DirentMenu extends React.Component {
menuList = ['Share'];
} else if (dirent.type === 'file') {
menuList = ['Share', 'Tags', 'Related Files', 'Divider', 'History', 'Details', 'Divider', 'Open via Client'];
if (!Utils.isMarkdownFile(dirent.name)) {
menuList.splice(2, 1);
}
if (isPro) {
if (dirent.is_locked) {
if (dirent.locked_by_me || (dirent.lock_owner === 'OnlineOffice' && currentRepoInfo.permission === 'rw')) {