@@ -47,7 +47,7 @@ qx.Class.define("osparc.support.SupportCenter", {
4747 this . getChildControl ( "conversations-button" ) ;
4848 }
4949
50- this . __showHome ( ) ;
50+ this . __selectHomeStackPage ( ) ;
5151 } ,
5252
5353 statics : {
@@ -100,7 +100,9 @@ qx.Class.define("osparc.support.SupportCenter", {
100100 case "buttons-layout" :
101101 control = new qx . ui . container . Composite ( new qx . ui . layout . HBox ( ) . set ( {
102102 alignX : "center" ,
103- } ) ) ;
103+ } ) ) . set ( {
104+ visibility : osparc . store . Groups . getInstance ( ) . isSupportEnabled ( ) ? "visible" : "excluded" ,
105+ } ) ;
104106 this . add ( control ) ;
105107 break ;
106108 case "home-button" :
@@ -112,7 +114,7 @@ qx.Class.define("osparc.support.SupportCenter", {
112114 allowGrowX : true ,
113115 center : true ,
114116 } ) ;
115- control . addListener ( "execute" , ( ) => this . __showHome ( ) , this ) ;
117+ control . addListener ( "execute" , ( ) => this . __selectHomeStackPage ( ) , this ) ;
116118 this . getChildControl ( "buttons-layout" ) . add ( control , { flex : 1 } ) ;
117119 break ;
118120 case "conversations-button" :
@@ -151,37 +153,35 @@ qx.Class.define("osparc.support.SupportCenter", {
151153 return control || this . base ( arguments , id ) ;
152154 } ,
153155
154- __showHome : function ( ) {
156+ __selectHomeStackPage : function ( ) {
155157 this . setCaption ( this . tr ( "Help & Support" ) ) ;
156158 this . getChildControl ( "main-stack" ) . setSelection ( [ this . getChildControl ( "home-page" ) ] ) ;
157- this . getChildControl ( "home-button" ) . set ( {
159+ this . getChildControl ( "home-button" ) . getChildControl ( "icon" ) . set ( {
158160 textColor : "strong-main" ,
159161 } ) ;
160- this . getChildControl ( "conversations-button" ) . set ( {
162+ this . getChildControl ( "conversations-button" ) . getChildControl ( "icon" ) . set ( {
161163 textColor : "text" ,
162164 } ) ;
163165 } ,
164166
165- showConversations : function ( ) {
167+ __selectConversationsStackPage : function ( ) {
166168 this . setCaption ( this . tr ( "Conversations" ) ) ;
167169 this . getChildControl ( "main-stack" ) . setSelection ( [ this . getChildControl ( "conversations-stack" ) ] ) ;
168- this . getChildControl ( "home-button" ) . set ( {
170+ this . getChildControl ( "home-button" ) . getChildControl ( "icon" ) . set ( {
169171 textColor : "text" ,
170172 } ) ;
171- this . getChildControl ( "conversations-button" ) . set ( {
173+ this . getChildControl ( "conversations-button" ) . getChildControl ( "icon" ) . set ( {
172174 textColor : "strong-main" ,
173175 } ) ;
176+ } ,
177+
178+ showConversations : function ( ) {
179+ this . __selectConversationsStackPage ( ) ;
174180 this . getChildControl ( "conversations-stack" ) . setSelection ( [ this . getChildControl ( "conversations-page" ) ] ) ;
175181 } ,
176182
177183 __showConversation : function ( ) {
178- this . getChildControl ( "main-stack" ) . setSelection ( [ this . getChildControl ( "conversations-stack" ) ] ) ;
179- this . getChildControl ( "home-button" ) . set ( {
180- textColor : "text" ,
181- } ) ;
182- this . getChildControl ( "conversations-button" ) . set ( {
183- textColor : "strong-main" ,
184- } ) ;
184+ this . __selectConversationsStackPage ( ) ;
185185 this . getChildControl ( "conversations-stack" ) . setSelection ( [ this . getChildControl ( "conversation-page" ) ] ) ;
186186 } ,
187187
0 commit comments