@@ -13,10 +13,11 @@ export interface TrayContextMenuProps {
1313 visible : boolean ;
1414 libraryName : string ;
1515 status : string ;
16+ refreshTrigger : ( ) => void ;
1617 onClose : ( ) => void ;
1718}
1819
19- const TrayContextMenu = ( { app, x, y, visible, libraryName, status, onClose } : TrayContextMenuProps ) => {
20+ const TrayContextMenu = ( { app, x, y, visible, libraryName, status, refreshTrigger , onClose } : TrayContextMenuProps ) => {
2021 const trayContextMenuRef = useRef ( null ) ;
2122 const [ validOptions , setValidOptions ] = useState ( {
2223 showInFileBrowser : false ,
@@ -67,7 +68,7 @@ const TrayContextMenu = ({ app, x, y, visible, libraryName, status, onClose }: T
6768 } , [ ] ) ;
6869
6970 // Context menu action handlers
70- const handleInstall = async ( libraryName ) => {
71+ const handleInstall = async ( libraryName , refreshTrigger ) => {
7172 const userResponse = confirm ( `Do you want to proceed with ${ libraryName } library installation?` ) ;
7273 if ( userResponse ) {
7374 try {
@@ -90,6 +91,7 @@ const TrayContextMenu = ({ app, x, y, visible, libraryName, status, onClose }: T
9091 } else {
9192 alert ( `Library configuration not found for: ${ libraryName } ` ) ;
9293 }
94+ refreshTrigger ( ) ;
9395 } catch ( error ) {
9496 alert ( `Failed to install ${ libraryName } . Please check the console for more details.` ) ;
9597 console . error ( `Failed to install ${ libraryName } :` , error ) ;
@@ -151,7 +153,7 @@ const TrayContextMenu = ({ app, x, y, visible, libraryName, status, onClose }: T
151153 < div className = "context-menu" ref = { trayContextMenuRef } style = { { position : 'absolute' , left : `${ x + 5 } px` , top : `${ y } px` , zIndex : 1000 } } >
152154 { status === 'remote' ? (
153155 < >
154- < div className = "context-menu-option" onClick = { ( ) => { handleInstall ( libraryName ) ; onClose ( ) ; } } > Install</ div >
156+ < div className = "context-menu-option" onClick = { ( ) => { handleInstall ( libraryName , refreshTrigger ) ; onClose ( ) ; } } > Install</ div >
155157 { validOptions . showPageInNewTab && (
156158 < div className = "context-menu-option" onClick = { ( ) => { handleShowPageInNewTab ( libraryName ) ; onClose ( ) ; } } > Open Repository</ div >
157159 ) }
0 commit comments