From cea111274f39b07441f6f8319e9e8266229d52be Mon Sep 17 00:00:00 2001 From: Michael An <2331806369@qq.com> Date: Mon, 29 Jul 2024 14:53:40 +0800 Subject: [PATCH] change seadoc menu sequence (#6437) --- .../components/dirent-grid-view/dirent-grid-view.js | 11 +++++++---- .../components/dirent-list-view/dirent-list-view.js | 10 ++++++---- frontend/src/utils/text-translation.js | 3 +-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/dirent-grid-view/dirent-grid-view.js b/frontend/src/components/dirent-grid-view/dirent-grid-view.js index cb9c61202a..2fd377c874 100644 --- a/frontend/src/components/dirent-grid-view/dirent-grid-view.js +++ b/frontend/src/components/dirent-grid-view/dirent-grid-view.js @@ -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); diff --git a/frontend/src/components/dirent-list-view/dirent-list-view.js b/frontend/src/components/dirent-list-view/dirent-list-view.js index f83c5f903b..3665cea8b7 100644 --- a/frontend/src/components/dirent-list-view/dirent-list-view.js +++ b/frontend/src/components/dirent-list-view/dirent-list-view.js @@ -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'; diff --git a/frontend/src/utils/text-translation.js b/frontend/src/utils/text-translation.js index 60b49c5751..5241f610db 100644 --- a/frontend/src/utils/text-translation.js +++ b/frontend/src/utils/text-translation.js @@ -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') },