mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 05:41:33 +02:00
Merge pull request #30598 from overleaf/mj-templates-file-menu-button
[web] Add template management button to new editor GitOrigin-RevId: 64aec2d771f551fc75d3a1e6f3c684842e1086f4
This commit is contained in:
committed by
Copybot
parent
e895ff8153
commit
3d5e84d264
@@ -1008,6 +1008,7 @@ module.exports = {
|
||||
importProjectFromGithubMenu: [],
|
||||
editorLeftMenuSync: [],
|
||||
editorLeftMenuManageTemplate: [],
|
||||
menubarExtraComponents: [],
|
||||
oauth2Server: [],
|
||||
managedGroupSubscriptionEnrollmentNotification: [],
|
||||
managedGroupEnrollmentInvite: [],
|
||||
|
||||
@@ -1061,6 +1061,7 @@
|
||||
"manage_sessions": "",
|
||||
"manage_subscription": "",
|
||||
"manage_tag": "",
|
||||
"manage_template": "",
|
||||
"manage_your_ai_assist_add_on": "",
|
||||
"managed": "",
|
||||
"managed_user_accounts": "",
|
||||
|
||||
@@ -8,7 +8,7 @@ import { MenuBarDropdown } from '@/shared/components/menu-bar/menu-bar-dropdown'
|
||||
import { MenuBarOption } from '@/shared/components/menu-bar/menu-bar-option'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import ChangeLayoutOptions from './change-layout-options'
|
||||
import { useCallback, useMemo, useState } from 'react'
|
||||
import { ElementType, useCallback, useMemo, useState } from 'react'
|
||||
import { useLayoutContext } from '@/shared/context/layout-context'
|
||||
import { useCommandProvider } from '@/features/ide-react/hooks/use-command-provider'
|
||||
import CommandDropdown, {
|
||||
@@ -24,6 +24,13 @@ import { useProjectSettingsContext } from '@/features/editor-left-menu/context/p
|
||||
import getMeta from '@/utils/meta'
|
||||
import EditorCloneProjectModalWrapper from '@/features/clone-project-modal/components/editor-clone-project-modal-wrapper'
|
||||
import useOpenProject from '@/shared/hooks/use-open-project'
|
||||
import importOverleafModules from '../../../../../macros/import-overleaf-module.macro'
|
||||
|
||||
const menubarExtraComponents = importOverleafModules(
|
||||
'menubarExtraComponents'
|
||||
) as {
|
||||
import: { default: ElementType }
|
||||
}[]
|
||||
|
||||
export const ToolbarMenuBar = () => {
|
||||
const { t } = useTranslation()
|
||||
@@ -75,7 +82,7 @@ export const ToolbarMenuBar = () => {
|
||||
children: ['new_file', 'new_folder', 'upload_file', 'copy_project'],
|
||||
},
|
||||
{ id: 'file-tools', children: ['show_version_history', 'word_count'] },
|
||||
{ id: 'submit', children: ['submit-project'] },
|
||||
{ id: 'submit', children: ['submit-project', 'manage-template'] },
|
||||
{
|
||||
id: 'file-download',
|
||||
children: ['download-as-source-zip', 'download-pdf'],
|
||||
@@ -283,6 +290,11 @@ export const ToolbarMenuBar = () => {
|
||||
handleHide={() => setShowCloneProjectModal(false)}
|
||||
openProject={openProject}
|
||||
/>
|
||||
{menubarExtraComponents.map(
|
||||
({ import: { default: Component } }, index) => (
|
||||
<Component key={index} />
|
||||
)
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1377,6 +1377,7 @@
|
||||
"manage_sessions": "Manage sessions",
|
||||
"manage_subscription": "Manage subscription",
|
||||
"manage_tag": "Manage tag",
|
||||
"manage_template": "Manage template",
|
||||
"manage_your_ai_assist_add_on": "Manage your AI Assist add-on",
|
||||
"managed": "Managed",
|
||||
"managed_user_accounts": "Managed user accounts",
|
||||
|
||||
Reference in New Issue
Block a user