Problem with override image

Do not get this to work - the standard Ash image is still there... also, is there it a spec of all the overrides?
sign_in_route overrides: [
AmplDevWeb.AuthOverrides,
AshAuthentication.Phoenix.Overrides.Default
]

defmodule AmplDevWeb.AuthOverrides do

@moduledoc "UI overrides for authentication views"
use AshAuthentication.Phoenix.Overrides

override AshAuthentication.Phoenix.SignInLive do
set :image_url, "./priv/images/ampl.png"

end
end
sign_in_route overrides: [
AmplDevWeb.AuthOverrides,
AshAuthentication.Phoenix.Overrides.Default
]

defmodule AmplDevWeb.AuthOverrides do

@moduledoc "UI overrides for authentication views"
use AshAuthentication.Phoenix.Overrides

override AshAuthentication.Phoenix.SignInLive do
set :image_url, "./priv/images/ampl.png"

end
end
3 Replies
axelb
axelb3y ago
Hi, The default override gathers all the possible overrides and can serve as a reference: https://github.com/team-alembic/ash_authentication_phoenix/blob/main/lib/ash_authentication_phoenix/overrides/default.ex
GitHub
ash_authentication_phoenix/default.ex at main · team-alembic/ash_au...
Drop-in authentication support for Phoenix apps using AshAuthentication. - ash_authentication_phoenix/default.ex at main · team-alembic/ash_authentication_phoenix
axelb
axelb3y ago
I used the module docs on hexdocs a lot too: https://hexdocs.pm/ash_authentication_phoenix/AshAuthentication.Phoenix.Components.Banner.html In your case, this worked for me as override module to remove the images:
defmodule ZenvtcWeb.AuthOverrides do
use AshAuthentication.Phoenix.Overrides
alias AshAuthentication.Phoenix.Components

override Components.Banner do
set :image_url, nil
set :dark_image_url, nil
end
end
defmodule ZenvtcWeb.AuthOverrides do
use AshAuthentication.Phoenix.Overrides
alias AshAuthentication.Phoenix.Components

override Components.Banner do
set :image_url, nil
set :dark_image_url, nil
end
end
Notice I don't override the same component
maxmannen
maxmannenOP3y ago
Excellent! Thanks!

Did you find this page helpful?