diff --git a/src/components/EditorPane.tsx b/src/components/EditorPane.tsx index 453e534d..2fe7cef4 100644 --- a/src/components/EditorPane.tsx +++ b/src/components/EditorPane.tsx @@ -46,8 +46,12 @@ type Props = { activeIndex: number; onActivate: (index: number) => void; onClose: (index: number) => void; + onCloseOthers: (index: number) => void; + onCloseToRight: (index: number) => void; + onCloseAll: () => void; onChange: (index: number, value: string) => void; onSave: (index: number) => void; + onRevealTab: (index: number) => void; onOpenFile?: (path: string) => void; settingsOpen?: boolean; settingsActive?: boolean; @@ -62,8 +66,12 @@ export function EditorPane({ activeIndex, onActivate, onClose, + onCloseOthers, + onCloseToRight, + onCloseAll, onChange, onSave, + onRevealTab, onOpenFile, settingsOpen = false, settingsActive = false, @@ -89,6 +97,11 @@ export function EditorPane({ const [imageMenu, setImageMenu] = useState<{ x: number; y: number } | null>( null, ); + const [tabMenu, setTabMenu] = useState<{ + x: number; + y: number; + index: number; + } | null>(null); const activeTab: EditorTab | undefined = settingsActive ? undefined : tabs[activeIndex]; // Close the image context menu whenever the user switches tabs or // toggles into the settings view, so it never lingers on the wrong file. @@ -312,13 +325,34 @@ export function EditorPane({ return (