Skip to content

Commit

Permalink
fix: restore favicon in Default layout, for all pages (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 authored Jun 7, 2024
1 parent 1020742 commit 783ee7b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
9 changes: 9 additions & 0 deletions src/elm/Layouts/Default.elm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ layout props shared route =
, view = view props shared route
, subscriptions = subscriptions
}
|> Layout.withOnUrlChanged OnUrlChanged



Expand Down Expand Up @@ -75,6 +76,8 @@ init shared _ =
-}
type Msg
= NoOp
-- BROWSER
| OnUrlChanged { from : Route (), to : Route () }
-- HEADER
| ShowHideIdentity (Maybe Bool)
| ShowHideHelp (Maybe Bool)
Expand All @@ -95,6 +98,12 @@ update msg model =
, Effect.none
)

-- BROWSER
OnUrlChanged _ ->
( model
, Effect.updateFavicon { favicon = Favicons.defaultFavicon }
)

-- HEADER
ShowHideIdentity show ->
( { model
Expand Down
15 changes: 6 additions & 9 deletions src/elm/Pages/Dashboards/Dashboard_.elm
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,12 @@ type alias Model =
init : Shared.Model -> Route { dashboard : String } -> () -> ( Model, Effect Msg )
init shared route () =
( { dashboard = RemoteData.Loading }
, Effect.batch
[ Effect.updateFavicon { favicon = Favicons.defaultFavicon }
, Effect.getDashboard
{ baseUrl = shared.velaAPIBaseURL
, session = shared.session
, onResponse = GetDashboardResponse
, dashboardId = route.params.dashboard
}
]
, Effect.getDashboard
{ baseUrl = shared.velaAPIBaseURL
, session = shared.session
, onResponse = GetDashboardResponse
, dashboardId = route.params.dashboard
}
)


Expand Down

0 comments on commit 783ee7b

Please sign in to comment.