@@ -45,6 +45,7 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
4545 members : {
4646 __userProfileData : null ,
4747 __userProfileModel : null ,
48+ __userProfileRenderer : null ,
4849 __userPrivacyData : null ,
4950 __userPrivacyModel : null ,
5051 __userProfileForm : null ,
@@ -79,6 +80,16 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
7980 "hideFullname" : "hideFullname" in privacyData ? privacyData [ "hideFullname" ] : true ,
8081 "hideEmail" : "hideEmail" in privacyData ? privacyData [ "hideEmail" ] : true ,
8182 } ) ;
83+
84+ const visibleIcon = "@FontAwesome5Solid/eye/12" ;
85+ const hiddenIcon = "@FontAwesome5Solid/eye-slash/12" ;
86+ const icons = {
87+ 0 : this . __userPrivacyModel . getHideUsername ( ) ? hiddenIcon : visibleIcon ,
88+ 1 : this . __userPrivacyModel . getHideFullname ( ) ? hiddenIcon : visibleIcon ,
89+ 2 : this . __userPrivacyModel . getHideFullname ( ) ? hiddenIcon : visibleIcon ,
90+ 3 : this . __userPrivacyModel . getHideEmail ( ) ? hiddenIcon : visibleIcon ,
91+ } ;
92+ this . __userProfileRenderer . setIcons ( icons ) ;
8293 }
8394 } ,
8495
@@ -111,13 +122,7 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
111122 form . add ( firstName , "First Name" , null , "firstName" ) ;
112123 form . add ( lastName , "Last Name" , null , "lastName" ) ;
113124 form . add ( email , "Email" , null , "email" ) ;
114- const icons = {
115- 0 : "@FontAwesome5Solid/eye/12" ,
116- 1 : "@FontAwesome5Solid/eye-slash/12" ,
117- 2 : "@FontAwesome5Solid/eye-slash/12" ,
118- 3 : "@FontAwesome5Solid/eye-slash/12" ,
119- } ;
120- const singleWithIcon = new osparc . ui . form . renderer . SingleWithIcon ( form , icons ) ;
125+ const singleWithIcon = this . __userProfileRenderer = new osparc . ui . form . renderer . SingleWithIcon ( form ) ;
121126 box . add ( singleWithIcon ) ;
122127
123128 const expirationLayout = new qx . ui . container . Composite ( new qx . ui . layout . HBox ( 5 ) ) . set ( {
0 commit comments