File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,7 @@ qx.Class.define("osparc.navigation.NavigationBar", {
254254 case "avatar-group" : {
255255 const maxWidth = osparc . WindowSizeTracker . getInstance ( ) . isCompactVersion ( ) ? 80 : 150 ;
256256 control = new osparc . ui . basic . AvatarGroup ( 26 , "right" , maxWidth ) . set ( {
257+ hideMyself : true ,
257258 alignY : "middle" ,
258259 visibility : "excluded" ,
259260 } ) ;
@@ -353,11 +354,8 @@ qx.Class.define("osparc.navigation.NavigationBar", {
353354 if ( this . getStudy ( ) && data [ "project_uuid" ] === this . getStudy ( ) . getUuid ( ) ) {
354355 const projectState = data [ "data" ] ;
355356 const currentUserGroupIds = osparc . study . Utils . state . getCurrentGroupIds ( projectState ) ;
356- // remove myself from the list of users
357- const filteredUserGroupIds = currentUserGroupIds . filter ( gid => gid !== osparc . store . Groups . getInstance ( ) . getMyGroupId ( ) ) ;
358- // show the rest of the users in the avatar group
359357 const avatarGroup = this . getChildControl ( "avatar-group" ) ;
360- avatarGroup . setUserGroupIds ( filteredUserGroupIds ) ;
358+ avatarGroup . setUserGroupIds ( currentUserGroupIds ) ;
361359 }
362360 }
363361 } , this ) ;
Original file line number Diff line number Diff line change @@ -43,6 +43,13 @@ qx.Class.define("osparc.ui.basic.AvatarGroup", {
4343 document . addEventListener ( "pointermove" , this . __onGlobalPointerMove ) ;
4444 } ,
4545
46+ properties : {
47+ hideMyself : {
48+ check : "Boolean" ,
49+ init : false ,
50+ }
51+ } ,
52+
4653 members : {
4754 __avatarSize : null ,
4855 __maxVisible : null ,
@@ -60,6 +67,12 @@ qx.Class.define("osparc.ui.basic.AvatarGroup", {
6067 return ;
6168 }
6269 this . __userGroupIds = userGroupIds || [ ] ;
70+
71+ if ( this . isHideMyself ( ) ) {
72+ // remove myself from the list of users
73+ userGroupIds = userGroupIds . filter ( gid => gid !== osparc . store . Groups . getInstance ( ) . getMyGroupId ( ) ) ;
74+ }
75+
6376 const usersStore = osparc . store . Users . getInstance ( ) ;
6477 const userPromises = userGroupIds . map ( userGroupId => usersStore . getUser ( userGroupId ) ) ;
6578 const users = [ ] ;
Original file line number Diff line number Diff line change @@ -288,7 +288,9 @@ qx.Class.define("osparc.workbench.NodeUI", {
288288 } ) ;
289289 break ;
290290 case "avatar-group" :
291- control = new osparc . ui . basic . AvatarGroup ( 20 , "right" ) ;
291+ control = new osparc . ui . basic . AvatarGroup ( 20 , "right" ) . set ( {
292+ hideMyself : true ,
293+ } ) ;
292294 this . getChildControl ( "middle-container" ) . addAt ( control , 2 , {
293295 flex : 1
294296 } ) ;
You can’t perform that action at this time.
0 commit comments