File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,11 @@ qx.Class.define("osparc.NewUITracker", {
3333 let msg = "" ;
3434 msg += qx . locale . Manager . tr ( "A new version of the application is now available." ) ;
3535 msg += "<br>" ;
36- msg += qx . locale . Manager . tr ( "Reload to get the latest features." ) ;
36+ msg += qx . locale . Manager . tr ( "Click the Reload button to get the latest features." ) ;
3737 // permanent message
38- osparc . FlashMessenger . getInstance ( ) . logAs ( msg , "INFO" , 0 ) ;
38+ const flashMessage = osparc . FlashMessenger . getInstance ( ) . logAs ( msg , "INFO" , 0 ) ;
39+ const reloadButton = osparc . utils . Utils . reloadNoCacheButton ( ) ;
40+ flashMessage . addWidget ( reloadButton ) ;
3941 this . stopTracker ( ) ;
4042 }
4143 } ;
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ qx.Class.define("osparc.ui.message.FlashMessage", {
3131 */
3232 construct : function ( message , level , duration ) {
3333 this . base ( arguments ) ;
34- this . _setLayout ( new qx . ui . layout . HBox ( 15 ) ) ;
34+ this . _setLayout ( new qx . ui . layout . VBox ( 15 ) ) ;
3535
3636 this . set ( {
3737 padding : 18 ,
@@ -112,31 +112,34 @@ qx.Class.define("osparc.ui.message.FlashMessage", {
112112 } ,
113113
114114 members : {
115- __closeCb : null ,
116115 _createChildControlImpl : function ( id ) {
117116 let control ;
118117 switch ( id ) {
118+ case "message-layout" :
119+ control = new qx . ui . container . Composite ( new qx . ui . layout . HBox ( 15 ) ) ;
120+ this . _add ( control ) ;
121+ break ;
119122 case "badge" :
120123 control = new qx . ui . basic . Image ( ) . set ( {
121124 alignY : "middle"
122125 } ) ;
123- this . _add ( control ) ;
126+ this . getChildControl ( "message-layout" ) . add ( control ) ;
124127 break ;
125128 case "message" :
126129 control = new qx . ui . basic . Label ( ) . set ( {
127130 font : "text-16" ,
128131 selectable : true ,
129132 rich : true
130133 } ) ;
131- this . _add ( control , {
134+ this . getChildControl ( "message-layout" ) . add ( control , {
132135 flex : 1
133136 } ) ;
134137 break ;
135138 case "closebutton" :
136139 control = new osparc . ui . basic . IconButton ( "@MaterialIcons/close/16" , ( ) => this . fireEvent ( "closeMessage" ) ) . set ( {
137140 alignY : "middle"
138141 } ) ;
139- this . _add ( control ) ;
142+ this . getChildControl ( "message-layout" ) . add ( control ) ;
140143 break ;
141144 }
142145 return control || this . base ( arguments , id ) ;
@@ -147,6 +150,10 @@ qx.Class.define("osparc.ui.message.FlashMessage", {
147150 if ( label ) {
148151 label . setValue ( value ) ;
149152 }
150- }
153+ } ,
154+
155+ addWidget : function ( widget ) {
156+ this . _add ( widget ) ;
157+ } ,
151158 }
152159} ) ;
You can’t perform that action at this time.
0 commit comments