File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
services/static-webserver/client/source/class/osparc/share Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -93,13 +93,13 @@ qx.Class.define("osparc.share.CollaboratorsService", {
9393 osparc . store . Services . patchServiceData ( this . _serializedDataCopy , "accessRights" , newAccessRights )
9494 . then ( ( ) => {
9595 this . fireDataEvent ( "updateAccessRights" , this . _serializedDataCopy ) ;
96- const text = this . tr ( "Service successfully shared. " ) ;
96+ const text = this . tr ( "Service successfully shared" ) ;
9797 osparc . FlashMessenger . getInstance ( ) . logAs ( text ) ;
9898 this . _reloadCollaboratorsList ( ) ;
9999 } )
100100 . catch ( err => {
101101 console . error ( err ) ;
102- osparc . FlashMessenger . getInstance ( ) . logAs ( this . tr ( "Something went wrong adding editor(s) " ) , "ERROR" ) ;
102+ osparc . FlashMessenger . getInstance ( ) . logAs ( this . tr ( "Something went wrong sharing the Service " ) , "ERROR" ) ;
103103 } ) ;
104104 } ,
105105
Original file line number Diff line number Diff line change @@ -127,23 +127,26 @@ qx.Class.define("osparc.share.CollaboratorsStudy", {
127127 return ;
128128 }
129129
130+ const resourceAlias = this . _resourceType === "template" ?
131+ osparc . product . Utils . getTemplateAlias ( { firstUpperCase : true } ) :
132+ osparc . product . Utils . getStudyAlias ( { firstUpperCase : true } ) ;
130133 const newCollaborators = { } ;
131134 gids . forEach ( gid => {
132135 newCollaborators [ gid ] = this . _resourceType === "study" ? this . self ( ) . getCollaboratorAccessRight ( ) : this . self ( ) . getViewerAccessRight ( ) ;
133136 } ) ;
134137 osparc . info . StudyUtils . addCollaborators ( this . _serializedDataCopy , newCollaborators )
135138 . then ( ( ) => {
136- this . fireDataEvent ( "updateAccessRights" , this . _serializedDataCopy ) ;
137- const text = this . tr ( "User(s) successfully added." ) ;
139+ const text = resourceAlias + this . tr ( " successfully shared" ) ;
138140 osparc . FlashMessenger . getInstance ( ) . logAs ( text ) ;
141+ this . fireDataEvent ( "updateAccessRights" , this . _serializedDataCopy ) ;
139142 this . _reloadCollaboratorsList ( ) ;
140143
141144 this . __pushNotifications ( gids ) ;
142145 this . __checkShareePermissions ( gids ) ;
143146 } )
144147 . catch ( err => {
145148 console . error ( err ) ;
146- osparc . FlashMessenger . getInstance ( ) . logAs ( this . tr ( "Something went adding user(s)" ) , "ERROR" ) ;
149+ osparc . FlashMessenger . getInstance ( ) . logAs ( this . tr ( "Something went wrong sharing the " ) + resourceAlias , "ERROR" ) ;
147150 } ) ;
148151 } ,
149152
Original file line number Diff line number Diff line change @@ -72,14 +72,14 @@ qx.Class.define("osparc.share.CollaboratorsWorkspace", {
7272 gids . forEach ( gid => newCollaborators [ gid ] = this . self ( ) . getCollaboratorAccessRight ( ) ) ;
7373 osparc . store . Workspaces . getInstance ( ) . addCollaborators ( this . __workspace . getWorkspaceId ( ) , newCollaborators )
7474 . then ( ( ) => {
75- this . fireDataEvent ( "updateAccessRights" , this . __workspace . serialize ( ) ) ;
76- const text = this . tr ( "User(s) successfully added." ) ;
75+ const text = this . tr ( "Workspace successfully shared" ) ;
7776 osparc . FlashMessenger . getInstance ( ) . logAs ( text ) ;
77+ this . fireDataEvent ( "updateAccessRights" , this . __workspace . serialize ( ) ) ;
7878 this . _reloadCollaboratorsList ( ) ;
7979 } )
8080 . catch ( err => {
8181 console . error ( err ) ;
82- osparc . FlashMessenger . getInstance ( ) . logAs ( this . tr ( "Something went adding user(s) " ) , "ERROR" ) ;
82+ osparc . FlashMessenger . getInstance ( ) . logAs ( this . tr ( "Something went wrong sharing the Workspace " ) , "ERROR" ) ;
8383 } ) ;
8484 } ,
8585
You can’t perform that action at this time.
0 commit comments