From 282d2e775a69e5196fd2be585c78455edfb2c349 Mon Sep 17 00:00:00 2001 From: SammyIsConfused Date: Tue, 18 Dec 2018 11:51:20 +1100 Subject: [PATCH] Make appbar notification icons consistent accross new UI pages (#659) * Swap enableNotifications flag to on by default the enableNotifications flag on the template.purs was true by default. It made more sense to be disableNotifications and false by default, so that the most common case is the unset case. * Remove inherit colour inline style on logout icon logout icon was set to inherit colour which meant it was unaffected by theming. Removed this style. --- .../Core/com.equella.core/js/src/MainUI/Template.purs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/Plugins/Core/com.equella.core/js/src/MainUI/Template.purs b/Source/Plugins/Core/com.equella.core/js/src/MainUI/Template.purs index 4a71fb9dba..a2fee1e1f2 100644 --- a/Source/Plugins/Core/com.equella.core/js/src/MainUI/Template.purs +++ b/Source/Plugins/Core/com.equella.core/js/src/MainUI/Template.purs @@ -137,7 +137,7 @@ type TemplateProps = ( menuMode :: String, fullscreenMode :: String, hideAppBar :: Boolean, - enableNotifications :: Boolean, + disableNotifications :: Boolean, innerRef :: Nullable (EffectFn1 (Nullable TemplateRef) Unit), errorResponse :: Nullable ErrorResponse ) @@ -172,7 +172,7 @@ templateDefaults title = { fixedViewPort:nullAny, preventNavigation:nullAny, menuExtra:nullAny, - enableNotifications: true, + disableNotifications: false, tabs:nullAny, backRoute: nullAny, footer: nullAny, @@ -300,15 +300,14 @@ templateClass = withStyles ourStyles $ R.component "Template" $ \this -> do userMaybe l = user ^? (_Just <<< l) userMenu = D.div [DP.className classes.userMenu ] $ (fromMaybe [] $ toMaybe menuExtra) <> ( - (guard $ props.enableNotifications && (not $ fromMaybe true $ userMaybe _guest)) *> + (guard $ not props.disableNotifications && (not $ fromMaybe true $ userMaybe _guest)) *> [ hidden {mdDown:true} [ badgedLink "assignment" _tasks "access/tasklist.do" topBarString.tasks , badgedLink "notifications" _notifications "access/notifications.do" topBarString.notifications ], tooltip {title: strings.menu.title} $ - iconButton {"aria-label": strings.menu.title, - color: inherit, + iconButton {"aria-label": strings.menu.title, onClick: withCurrentTarget $ d <<< UserMenuAnchor <<< Just} [ icon_ [ D.text "account_circle"] ], menu {