mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-30 12:24:25 +02:00
Merge pull request #27172 from overleaf/dp-file-menu-settings
Add settings option to file menu GitOrigin-RevId: a5ad0cecad5b7896185a8b9c91364c7904961438
This commit is contained in:
@@ -45,6 +45,7 @@ import { useFeatureFlag } from '@/shared/context/split-test-context'
|
||||
import { useSurveyUrl } from '../hooks/use-survey-url'
|
||||
import { useProjectContext } from '@/shared/context/project-context'
|
||||
import usePreviousValue from '@/shared/hooks/use-previous-value'
|
||||
import { useCommandProvider } from '@/features/ide-react/hooks/use-command-provider'
|
||||
|
||||
type RailElement = {
|
||||
icon: AvailableUnfilledIcon
|
||||
@@ -185,6 +186,19 @@ export const RailLayout = () => {
|
||||
[setLeftMenuShown, t, sendEvent]
|
||||
)
|
||||
|
||||
useCommandProvider(
|
||||
() => [
|
||||
{
|
||||
id: 'open-settings',
|
||||
handler: () => {
|
||||
setLeftMenuShown(true)
|
||||
},
|
||||
label: t('settings'),
|
||||
},
|
||||
],
|
||||
[t, setLeftMenuShown]
|
||||
)
|
||||
|
||||
const onTabSelect = useCallback(
|
||||
(key: string | null) => {
|
||||
if (key === selectedTab) {
|
||||
|
||||
@@ -72,6 +72,10 @@ export const ToolbarMenuBar = () => {
|
||||
id: 'file-download',
|
||||
children: ['download-as-source-zip', 'download-pdf'],
|
||||
},
|
||||
{
|
||||
id: 'settings',
|
||||
children: ['open-settings'],
|
||||
},
|
||||
],
|
||||
[]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user