File tree Expand file tree Collapse file tree 3 files changed +19
-16
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 3 files changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,17 @@ qx.Class.define("osparc.auth.Data", {
147147 return this . getUsername ( ) ;
148148 } ,
149149
150+ getFullName : function ( ) {
151+ let name = "" ;
152+ if ( this . getFirstName ( ) ) {
153+ name += this . getFirstName ( ) ;
154+ }
155+ if ( this . getLastName ( ) ) {
156+ name += " " + this . getLastName ( ) ;
157+ }
158+ return name ;
159+ } ,
160+
150161 getFriendlyRole : function ( ) {
151162 const role = this . getRole ( ) ;
152163 let friendlyRole = role . replace ( / _ / g, " " ) ;
Original file line number Diff line number Diff line change @@ -64,24 +64,17 @@ qx.Class.define("osparc.desktop.account.MyAccount", {
6464 authData . bind ( "username" , usernameLabel , "value" ) ;
6565 layout . add ( usernameLabel ) ;
6666
67- const nameLabel = new qx . ui . basic . Label ( ) . set ( {
67+ const fullNameLabel = new qx . ui . basic . Label ( ) . set ( {
6868 font : "text-13" ,
6969 alignX : "center"
7070 } ) ;
71- layout . add ( nameLabel ) ;
72- const updateName = ( ) => {
73- let name = "" ;
74- if ( authData . getFirstName ( ) ) {
75- name += authData . getFirstName ( ) ;
76- }
77- if ( authData . getLastName ( ) ) {
78- name += " " + authData . getLastName ( ) ;
79- }
80- nameLabel . setValue ( name ) ;
81- }
82- updateName ( ) ;
83- authData . addListener ( "changeFirstName" , updateName ) ;
84- authData . addListener ( "changeLastName" , updateName ) ;
71+ layout . add ( fullNameLabel ) ;
72+ authData . bind ( "firstName" , fullNameLabel , "value" , {
73+ converter : ( ) => authData . getFullName ( )
74+ } ) ;
75+ authData . bind ( "lastName" , fullNameLabel , "value" , {
76+ converter : ( ) => authData . getFullName ( )
77+ } ) ;
8578
8679 if ( authData . getRole ( ) !== "user" ) {
8780 const role = authData . getFriendlyRole ( ) ;
Original file line number Diff line number Diff line change @@ -576,7 +576,6 @@ qx.Theme.define("osparc.theme.Appearance", {
576576 decorator : "form-button" ,
577577 cursor : "pointer" ,
578578 padding : 5 ,
579- center : true ,
580579 } ;
581580 if ( states . hovered ) {
582581 style . decorator = "form-button-hovered" ;
You can’t perform that action at this time.
0 commit comments