mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-14 15:35:35 +00:00
change seadoc menu sequence (#6437)
This commit is contained in:
parent
516f87fc30
commit
cea111274f
@ -630,10 +630,6 @@ class DirentGridView extends React.Component {
|
||||
|
||||
let direntsContainerMenuList = [
|
||||
NEW_FOLDER, NEW_FILE, 'Divider',
|
||||
NEW_MARKDOWN_FILE,
|
||||
NEW_EXCEL_FILE,
|
||||
NEW_POWERPOINT_FILE,
|
||||
NEW_WORD_FILE
|
||||
];
|
||||
const { currentRepoInfo, selectedDirentList } = this.props;
|
||||
|
||||
@ -641,6 +637,13 @@ class DirentGridView extends React.Component {
|
||||
direntsContainerMenuList.push(NEW_SEADOC_FILE);
|
||||
}
|
||||
|
||||
direntsContainerMenuList.push(
|
||||
NEW_MARKDOWN_FILE,
|
||||
NEW_EXCEL_FILE,
|
||||
NEW_POWERPOINT_FILE,
|
||||
NEW_WORD_FILE
|
||||
);
|
||||
|
||||
if (selectedDirentList.length === 0) {
|
||||
if (!hasCustomPermission('create')) return;
|
||||
this.handleContextClick(event, DIRENT_GRID_CONTAINER_MENU_ID, direntsContainerMenuList);
|
||||
|
@ -332,15 +332,17 @@ class DirentListView extends React.Component {
|
||||
|
||||
const direntsContainerMenuList = [
|
||||
NEW_FOLDER, NEW_FILE, 'Divider',
|
||||
NEW_MARKDOWN_FILE,
|
||||
NEW_EXCEL_FILE,
|
||||
NEW_POWERPOINT_FILE,
|
||||
NEW_WORD_FILE
|
||||
];
|
||||
const { currentRepoInfo } = this.props;
|
||||
if (enableSeadoc && !currentRepoInfo.encrypted) {
|
||||
direntsContainerMenuList.push(NEW_SEADOC_FILE);
|
||||
}
|
||||
direntsContainerMenuList.push(
|
||||
NEW_MARKDOWN_FILE,
|
||||
NEW_EXCEL_FILE,
|
||||
NEW_POWERPOINT_FILE,
|
||||
NEW_WORD_FILE
|
||||
);
|
||||
|
||||
if (this.props.selectedDirentList.length === 0) {
|
||||
let id = 'dirent-container-menu';
|
||||
|
@ -9,8 +9,7 @@ const TextTranslation = {
|
||||
'NEW_EXCEL_FILE': { key: 'New Excel File', value: gettext('New Excel File') },
|
||||
'NEW_POWERPOINT_FILE': { key: 'New PowerPoint File', value: gettext('New PowerPoint File') },
|
||||
'NEW_WORD_FILE': { key: 'New Word File', value: gettext('New Word File') },
|
||||
'NEW_SEADOC_FILE': { key: 'New SeaDoc File', value: gettext('New SeaDoc File') + ' (beta)' },
|
||||
|
||||
'NEW_SEADOC_FILE': { key: 'New SeaDoc File', value: gettext('New SeaDoc File') },
|
||||
'SHARE': { key: 'Share', value: gettext('Share') },
|
||||
'DOWNLOAD': { key: 'Download', value: gettext('Download') },
|
||||
'DELETE': { key: 'Delete', value: gettext('Delete') },
|
||||
|
Loading…
Reference in New Issue
Block a user