@@ -94,13 +94,24 @@ qx.Class.define("osparc.support.ConversationPage", {
9494 } ) ;
9595 this . getChildControl ( "conversation-header-center-layout" ) . addAt ( control , 1 ) ;
9696 break ;
97+ case "open-project-button" :
98+ control = new qx . ui . form . Button ( ) . set ( {
99+ maxWidth : 26 ,
100+ maxHeight : 24 ,
101+ alignX : "center" ,
102+ alignY : "middle" ,
103+ icon : "@FontAwesome5Solid/external-link-alt/12" ,
104+ } ) ;
105+ control . addListener ( "execute" , ( ) => this . __openProjectDetails ( ) ) ;
106+ this . getChildControl ( "conversation-header-layout" ) . addAt ( control , 2 ) ;
107+ break ;
97108 case "conversation-options" : {
98109 control = new qx . ui . form . MenuButton ( ) . set ( {
99- maxWidth : 22 ,
100- maxHeight : 22 ,
110+ maxWidth : 24 ,
111+ maxHeight : 24 ,
101112 alignX : "center" ,
102113 alignY : "middle" ,
103- icon : "@FontAwesome5Solid/ellipsis-v/14 " ,
114+ icon : "@FontAwesome5Solid/ellipsis-v/12 " ,
104115 } ) ;
105116 const menu = new qx . ui . menu . Menu ( ) . set ( {
106117 position : "bottom-right" ,
@@ -112,7 +123,7 @@ qx.Class.define("osparc.support.ConversationPage", {
112123 } ) ;
113124 renameButton . addListener ( "execute" , ( ) => this . __renameConversation ( ) ) ;
114125 menu . add ( renameButton ) ;
115- this . getChildControl ( "conversation-header-layout" ) . addAt ( control , 2 ) ;
126+ this . getChildControl ( "conversation-header-layout" ) . addAt ( control , 3 ) ;
116127 break ;
117128 }
118129 case "conversation-content" :
@@ -152,6 +163,13 @@ qx.Class.define("osparc.support.ConversationPage", {
152163 extraContextLabel . exclude ( ) ;
153164 }
154165
166+ const openButton = this . getChildControl ( "open-project-button" ) ;
167+ if ( conversation && conversation . getContextProjectId ( ) ) {
168+ openButton . show ( ) ;
169+ } else {
170+ openButton . exclude ( ) ;
171+ }
172+
155173 const options = this . getChildControl ( "conversation-options" ) ;
156174 if ( conversation && conversation . amIOwner ( ) ) {
157175 options . show ( ) ;
@@ -160,6 +178,21 @@ qx.Class.define("osparc.support.ConversationPage", {
160178 }
161179 } ,
162180
181+ __openProjectDetails : function ( ) {
182+ const projectId = this . getConversation ( ) . getContextProjectId ( ) ;
183+ if ( projectId ) {
184+ osparc . store . Study . getInstance ( ) . getOne ( projectId )
185+ . then ( studyData => {
186+ if ( studyData ) {
187+ const studyDataCopy = osparc . data . model . Study . deepCloneStudyObject ( studyData ) ;
188+ studyDataCopy [ "resourceType" ] = "study" ;
189+ osparc . dashboard . ResourceDetails . popUpInWindow ( studyDataCopy ) ;
190+ }
191+ } )
192+ . catch ( err => console . warn ( err ) ) ;
193+ }
194+ } ,
195+
163196 __renameConversation : function ( ) {
164197 let oldName = this . getConversation ( ) . getName ( ) ;
165198 if ( oldName === "null" ) {
0 commit comments