File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,11 @@ qx.Class.define("osparc.navigation.UserMenu", {
9898 control . addListener ( "execute" , ( ) => osparc . vipMarket . MarketWindow . openWindow ( ) ) ;
9999 this . add ( control ) ;
100100 break ;
101+ case "rocket-preview" :
102+ control = new qx . ui . menu . Button ( this . tr ( "Rocket Preview" ) ) ;
103+ control . addListener ( "execute" , ( ) => osparc . wrapper . RocketPreview . openWindow ( ) ) ;
104+ this . add ( control ) ;
105+ break ;
101106 case "about" :
102107 control = new qx . ui . menu . Button ( this . tr ( "About oSPARC" ) ) ;
103108 osparc . utils . Utils . setIdToWidget ( control , "userMenuAboutBtn" ) ;
@@ -177,6 +182,10 @@ qx.Class.define("osparc.navigation.UserMenu", {
177182 this . getChildControl ( "market" ) ;
178183 }
179184
185+ if ( osparc . utils . Utils . isDevelopmentPlatform ( ) ) {
186+ this . getChildControl ( "rocket-preview" ) ;
187+ }
188+
180189 this . getChildControl ( "about" ) ;
181190 if ( osparc . product . Utils . showAboutProduct ( ) ) {
182191 this . getChildControl ( "about-product" ) ;
Original file line number Diff line number Diff line change @@ -41,6 +41,31 @@ qx.Class.define("osparc.wrapper.RocketPreview", {
4141 window . addEventListener ( "message" , this . __onMessage . bind ( this ) ) ;
4242 } ,
4343
44+ statics : {
45+ openWindow : function ( ) {
46+ const win = new osparc . ui . window . Window ( ) ;
47+ win . set ( {
48+ caption : "Rocket Preview" ,
49+ width : 800 ,
50+ height : 600 ,
51+ minWidth : 400 ,
52+ minHeight : 300 ,
53+ showMinimize : false ,
54+ showMaximize : false ,
55+ modal : true ,
56+ allowClose : true ,
57+ contentPadding : 0 ,
58+ layout : new qx . ui . layout . Grow ( )
59+ } ) ;
60+
61+ const rocketPreview = new osparc . wrapper . RocketPreview ( ) ;
62+ win . add ( rocketPreview ) ;
63+ win . center ( ) ;
64+ win . open ( ) ;
65+ return win ;
66+ }
67+ } ,
68+
4469 properties : {
4570 /**
4671 * True once the iframe signals it's ready (osparc:ready).
You can’t perform that action at this time.
0 commit comments