Merge pull request #27172 from overleaf/dp-file-menu-settings

Add settings option to file menu

GitOrigin-RevId: a5ad0cecad5b7896185a8b9c91364c7904961438
This commit is contained in:
David
2025-07-17 10:34:15 +01:00
committed by Copybot
parent 97eceb9c58
commit be4a11484f
2 changed files with 18 additions and 0 deletions

View File

@@ -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) {

View File

@@ -72,6 +72,10 @@ export const ToolbarMenuBar = () => {
id: 'file-download',
children: ['download-as-source-zip', 'download-pdf'],
},
{
id: 'settings',
children: ['open-settings'],
},
],
[]
)