@@ -35,10 +35,8 @@ qx.Class.define("osparc.support.SupportCenter", {
3535 showClose : true ,
3636 } ) ;
3737
38- this . getChildControl ( "conversations-intro-text" ) ;
39- this . getChildControl ( "conversations-list" ) ;
40- this . getChildControl ( "ask-a-question-button" ) ;
41- this . getChildControl ( "book-a-call-button" ) ;
38+ this . getChildControl ( "conversations-page" ) ;
39+ this . getChildControl ( "conversation-page" ) ;
4240 } ,
4341
4442 statics : {
@@ -83,60 +81,14 @@ qx.Class.define("osparc.support.SupportCenter", {
8381 flex : 1
8482 } ) ;
8583 break ;
86- case "conversations-layout" :
87- control = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( 15 ) ) ;
88- this . getChildControl ( "stack-layout" ) . add ( control ) ;
89- break ;
90- case "conversations-intro-text" : {
91- control = new qx . ui . basic . Label ( ) . set ( {
92- rich : true ,
93- font : "text-14" ,
94- } ) ;
95- const isSupportUser = osparc . store . Groups . getInstance ( ) . amIASupportUser ( ) ;
96- control . set ( {
97- value : isSupportUser ?
98- this . tr ( "Thanks for being here! Let's help every user feel supported." ) :
99- this . tr ( "Need help or want to share feedback? You're in the right place." ) ,
100- } ) ;
101- this . getChildControl ( "conversations-layout" ) . add ( control ) ;
102- break ;
103- }
104- case "conversations-list" : {
105- control = new osparc . support . Conversations ( ) ;
84+ case "conversations-page" :
85+ control = new osparc . support . ConversationsPage ( ) ;
10686 control . addListener ( "openConversation" , e => {
10787 const conversationId = e . getData ( ) ;
10888 this . openConversation ( conversationId ) ;
10989 } , this ) ;
110- const scroll = new qx . ui . container . Scroll ( ) ;
111- scroll . add ( control ) ;
112- this . getChildControl ( "conversations-layout" ) . add ( scroll , {
113- flex : 1 ,
114- } ) ;
115- break ;
116- }
117- case "buttons-layout" :
118- control = new qx . ui . container . Composite ( new qx . ui . layout . HBox ( 10 ) . set ( {
119- alignX : "center" ,
120- } ) ) ;
121- this . getChildControl ( "conversations-layout" ) . add ( control ) ;
122- break ;
123- case "ask-a-question-button" :
124- control = new osparc . ui . form . FetchButton ( this . tr ( "Ask a Question" ) ) . set ( {
125- appearance : "strong-button" ,
126- allowGrowX : false ,
127- center : true ,
128- } ) ;
129- control . addListener ( "execute" , ( ) => this . openConversation ( null ) , this ) ;
130- this . getChildControl ( "buttons-layout" ) . add ( control ) ;
131- break ;
132- case "book-a-call-button" :
133- control = new osparc . ui . form . FetchButton ( this . tr ( "Book a Call" ) ) . set ( {
134- appearance : "strong-button" ,
135- allowGrowX : false ,
136- center : true ,
137- } ) ;
138- control . addListener ( "execute" , ( ) => this . createConversationBookCall ( null ) , this ) ;
139- this . getChildControl ( "buttons-layout" ) . add ( control ) ;
90+ control . addListener ( "createConversationBookCall" , ( ) => this . createConversationBookCall ( ) , this ) ;
91+ this . getChildControl ( "stack-layout" ) . add ( control ) ;
14092 break ;
14193 case "conversation-page" :
14294 control = new osparc . support . ConversationPage ( ) ;
@@ -148,7 +100,7 @@ qx.Class.define("osparc.support.SupportCenter", {
148100 } ,
149101
150102 __showConversations : function ( ) {
151- this . getChildControl ( "stack-layout" ) . setSelection ( [ this . getChildControl ( "conversations-layout " ) ] ) ;
103+ this . getChildControl ( "stack-layout" ) . setSelection ( [ this . getChildControl ( "conversations-page " ) ] ) ;
152104 } ,
153105
154106 __showConversation : function ( ) {
0 commit comments