@@ -45,7 +45,7 @@ qx.Class.define("osparc.notification.NotificationsButton", {
4545 let control ;
4646 switch ( id ) {
4747 case "icon" : {
48- control = new qx . ui . basic . Image ( ) ;
48+ control = new qx . ui . basic . Image ( "@FontAwesome5Regular/bell/22" ) ;
4949 const iconContainer = new qx . ui . container . Composite ( new qx . ui . layout . HBox ( ) . set ( {
5050 alignY : "middle" ,
5151 } ) ) . set ( {
@@ -57,6 +57,24 @@ qx.Class.define("osparc.notification.NotificationsButton", {
5757 } ) ;
5858 break ;
5959 }
60+ case "is-active-icon-outline" :
61+ control = new qx . ui . basic . Image ( "@FontAwesome5Solid/circle/12" ) . set ( {
62+ textColor : osparc . navigation . NavigationBar . BG_COLOR ,
63+ } ) ;
64+ this . _add ( control , {
65+ bottom : - 4 ,
66+ right : - 4 ,
67+ } ) ;
68+ break ;
69+ case "is-active-icon" :
70+ control = new qx . ui . basic . Image ( "@FontAwesome5Solid/circle/8" ) . set ( {
71+ textColor : "strong-main" ,
72+ } ) ;
73+ this . _add ( control , {
74+ bottom : - 2 ,
75+ right : - 2 ,
76+ } ) ;
77+ break ;
6078 case "number" :
6179 control = new qx . ui . basic . Label ( ) . set ( {
6280 backgroundColor : "error" ,
@@ -82,16 +100,15 @@ qx.Class.define("osparc.notification.NotificationsButton", {
82100 const notifications = notificationManager . getNotifications ( ) ;
83101 notifications . forEach ( notification => notification . addListener ( "changeRead" , ( ) => this . __updateButton ( ) , this ) ) ;
84102
85- const nUnreadNotifications = notifications . filter ( notification => notification . getRead ( ) === false ) . length ;
86- const icon = this . getChildControl ( "icon" ) ;
87- icon . set ( {
88- source : nUnreadNotifications > 0 ? "@FontAwesome5Solid/bell/22" : "@FontAwesome5Regular/bell/22" ,
89- textColor : nUnreadNotifications > 0 ? "strong-main" : "text"
90- } ) ;
91- const number = this . getChildControl ( "number" ) ;
92- number . set ( {
93- value : nUnreadNotifications . toString ( ) ,
94- visibility : nUnreadNotifications > 0 ? "visible" : "excluded"
103+ let nUnreadNotifications = notifications . filter ( notification => notification . getRead ( ) === false ) . length ;
104+ nUnreadNotifications = 5 ;
105+ [
106+ this . getChildControl ( "is-active-icon-outline" ) ,
107+ this . getChildControl ( "is-active-icon" ) ,
108+ ] . forEach ( control => {
109+ control . set ( {
110+ visibility : nUnreadNotifications > 0 ? "visible" : "excluded"
111+ } ) ;
95112 } ) ;
96113 } ,
97114
0 commit comments