@@ -231,28 +231,9 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
231231 maxWidth : 500
232232 } ) ;
233233
234- const label = osparc . ui . window . TabbedView . createHelpLabel ( this . tr ( "For Privacy reasons, you might want to hide some personal fields ." ) ) ;
234+ const label = osparc . ui . window . TabbedView . createHelpLabel ( this . tr ( "For Privacy reasons, you might want to hide some personal data ." ) ) ;
235235 box . add ( label ) ;
236236
237- const optOutMessage = new qx . ui . basic . Atom ( ) . set ( {
238- label : "If all searchable fields are showHidden, you will not be " ,
239- icon : "@FontAwesome5Solid/copy/10" ,
240- iconPosition : "right" ,
241- gap : 8 ,
242- cursor : "pointer" ,
243- alignX : "center" ,
244- allowGrowX : false ,
245- visibility : "excluded" ,
246- } ) ;
247- box . add ( optOutMessage ) ;
248- if (
249- this . __userPrivacyModel . getHideUsername ( ) &&
250- this . __userPrivacyModel . getHideFullname ( ) &&
251- this . __userPrivacyModel . getHideEmail ( )
252- ) {
253- optOutMessage . show ( ) ;
254- }
255-
256237 const hideUsername = new qx . ui . form . CheckBox ( ) . set ( {
257238 value : false
258239 } ) ;
@@ -328,6 +309,29 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
328309 }
329310 } ) ;
330311
312+ const optOutMessage = new qx . ui . basic . Atom ( ) . set ( {
313+ label : "If all searchable fields are hidden, you will not be findable." ,
314+ icon : "@FontAwesome5Solid/exclamation-triangle/14" ,
315+ gap : 8 ,
316+ allowGrowX : false ,
317+ } ) ;
318+ optOutMessage . getChildControl ( "icon" ) . setTextColor ( "warning-yellow" )
319+ box . add ( optOutMessage ) ;
320+ const privacyFields = [
321+ hideUsername ,
322+ hideFullname ,
323+ hideEmail ,
324+ ]
325+ const evaluateWarningMessage = ( ) => {
326+ if ( privacyFields . every ( privacyField => privacyField . getValue ( ) ) ) {
327+ optOutMessage . show ( ) ;
328+ } else {
329+ optOutMessage . exclude ( ) ;
330+ }
331+ } ;
332+ evaluateWarningMessage ( ) ;
333+ privacyFields . forEach ( privacyField => privacyField . addListener ( "changeValue" , ( ) => evaluateWarningMessage ( ) ) ) ;
334+
331335 return box ;
332336 } ,
333337
0 commit comments