Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: restore favicon in Default layout, for all pages #805

Merged
merged 3 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading