@@ -21,6 +21,7 @@ import Favorites from "src/client/favorites.js"
2121import { applicationFolder } from 'src/client/vivide/utils.js' ;
2222import { createView } from 'src/client/vivide/scripts/loading.js' ;
2323import SearchRoots from "src/client/search-roots.js"
24+ import Connection from "src/components/halo/Connection.js" ;
2425
2526// import lively from './lively.js'; #TODO resinsert after we support cycles again
2627
@@ -330,6 +331,19 @@ export default class ContextMenu {
330331
331332 // #important
332333 static worldMenuItems ( worldContext ) {
334+
335+ let connections = [ ]
336+ Connection . allConnections . forEach ( connection => {
337+ connections . push ( connection )
338+ } )
339+ let existingConnectionsMenu = connections . map ( connection => [ connection . getFullLabel ( ) ,
340+ async ( ) => {
341+ let editor = await lively . openComponentInWindow ( 'lively-connection-editor' )
342+ lively . setExtent ( editor . parentElement , lively . pt ( 800 , 50 ) )
343+ editor . setConnection ( connection )
344+ } ] ) ;
345+
346+
333347 var items = [
334348 [ "Workspace" , evt => {
335349 this . hide ( ) ;
@@ -611,6 +625,13 @@ export default class ContextMenu {
611625 }
612626 } ] ] ) , undefined , '<i class="fa fa-window-restore" aria-hidden="true"></i>'
613627 ] ,
628+ [
629+ "Debug" , [
630+ [ 'Connections' , existingConnectionsMenu , '' , '<i class="fa fa-arrow-right" aria-hidden="true"></i>' ]
631+
632+ ] , undefined , '<i class="fa fa-bug" aria-hidden="true"></i>'
633+ ] ,
634+
614635 [ "View" , [
615636 [ "Reset View" , ( ) => ViewNav . resetView ( ) ,
616637 "" , '<i class="fa fa-window-restore" aria-hidden="true"></i>' ] ,
0 commit comments