Skip to content

Commit 282d2e7

Browse files
SammyIsConfuseddoolse
authored andcommitted
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.
1 parent 991aeb9 commit 282d2e7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Source/Plugins/Core/com.equella.core/js/src/MainUI/Template.purs

+4-5
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ type TemplateProps = (
137137
menuMode :: String,
138138
fullscreenMode :: String,
139139
hideAppBar :: Boolean,
140-
enableNotifications :: Boolean,
140+
disableNotifications :: Boolean,
141141
innerRef :: Nullable (EffectFn1 (Nullable TemplateRef) Unit),
142142
errorResponse :: Nullable ErrorResponse
143143
)
@@ -172,7 +172,7 @@ templateDefaults title = {
172172
fixedViewPort:nullAny,
173173
preventNavigation:nullAny,
174174
menuExtra:nullAny,
175-
enableNotifications: true,
175+
disableNotifications: false,
176176
tabs:nullAny,
177177
backRoute: nullAny,
178178
footer: nullAny,
@@ -300,15 +300,14 @@ templateClass = withStyles ourStyles $ R.component "Template" $ \this -> do
300300
userMaybe l = user ^? (_Just <<< l)
301301
userMenu = D.div [DP.className classes.userMenu ] $ (fromMaybe [] $ toMaybe menuExtra) <>
302302
(
303-
(guard $ props.enableNotifications && (not $ fromMaybe true $ userMaybe _guest)) *>
303+
(guard $ not props.disableNotifications && (not $ fromMaybe true $ userMaybe _guest)) *>
304304
[
305305
hidden {mdDown:true} [
306306
badgedLink "assignment" _tasks "access/tasklist.do" topBarString.tasks ,
307307
badgedLink "notifications" _notifications "access/notifications.do" topBarString.notifications
308308
],
309309
tooltip {title: strings.menu.title} $
310-
iconButton {"aria-label": strings.menu.title,
311-
color: inherit,
310+
iconButton {"aria-label": strings.menu.title,
312311
onClick: withCurrentTarget $ d <<< UserMenuAnchor <<< Just}
313312
[ icon_ [ D.text "account_circle"] ],
314313
menu {

0 commit comments

Comments
 (0)