diff --git a/dev/dev_web/live/custom_sign_in_live.ex b/dev/dev_web/live/custom_sign_in_live.ex index 8cc17905..392d498c 100644 --- a/dev/dev_web/live/custom_sign_in_live.ex +++ b/dev/dev_web/live/custom_sign_in_live.ex @@ -33,37 +33,35 @@ defmodule DevWeb.CustomSignInLive do > <:sign_in_extra :let={form}>
- <%= label(form, :capcha, + {label(form, :capcha, class: "block text-sm font-medium text-gray-700 mb-1 dark:text-white" - ) %> - <%= text_input(form, :capcha, + )} + {text_input(form, :capcha, class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-blue-pale-500 focus:border-blue-pale-500 sm:text-sm dark:text-black" - ) %> + )}
<:register_extra :let={form}>
- <%= label(form, :name, - class: "block text-sm font-medium text-gray-700 mb-1 dark:text-white" - ) %> - <%= text_input(form, :name, + {label(form, :name, class: "block text-sm font-medium text-gray-700 mb-1 dark:text-white")} + {text_input(form, :name, class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-blue-pale-500 focus:border-blue-pale-500 sm:text-sm dark:text-black" - ) %> + )}
<:reset_extra :let={form}>
- <%= label(form, :capcha, + {label(form, :capcha, class: "block text-sm font-medium text-gray-700 mb-1 dark:text-white" - ) %> - <%= text_input(form, :capcha, + )} + {text_input(form, :capcha, class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-blue-pale-500 focus:border-blue-pale-500 sm:text-sm dark:text-black" - ) %> + )}
diff --git a/dev/dev_web/live/home_page_live.ex b/dev/dev_web/live/home_page_live.ex index eb0fc1ba..cc4c10a2 100644 --- a/dev/dev_web/live/home_page_live.ex +++ b/dev/dev_web/live/home_page_live.ex @@ -12,7 +12,7 @@ defmodule DevWeb.HomePageLive do ~H""" <%= if @current_user do %> -

Current user: <%= @current_user.email %>

+

Current user: {@current_user.email}

<.link navigate="/sign-out">Sign out <% else %> diff --git a/dev/dev_web/templates/auth/failure.html.heex b/dev/dev_web/templates/auth/failure.html.heex index f7704766..0b3e7107 100644 --- a/dev/dev_web/templates/auth/failure.html.heex +++ b/dev/dev_web/templates/auth/failure.html.heex @@ -6,4 +6,4 @@

-<%= link("Home", to: Routes.live_path(@conn, DevWeb.HomePageLive)) %> +{link("Home", to: Routes.live_path(@conn, DevWeb.HomePageLive))} diff --git a/dev/dev_web/templates/auth/sign_out.html.heex b/dev/dev_web/templates/auth/sign_out.html.heex index 990840a0..97e22b95 100644 --- a/dev/dev_web/templates/auth/sign_out.html.heex +++ b/dev/dev_web/templates/auth/sign_out.html.heex @@ -1,3 +1,3 @@

Signed out

-<%= link("Home", to: Routes.live_path(@conn, DevWeb.HomePageLive)) %> +{link("Home", to: Routes.live_path(@conn, DevWeb.HomePageLive))} diff --git a/dev/dev_web/templates/auth/success.html.heex b/dev/dev_web/templates/auth/success.html.heex index 1592f050..a2265c0a 100644 --- a/dev/dev_web/templates/auth/success.html.heex +++ b/dev/dev_web/templates/auth/success.html.heex @@ -1 +1 @@ -Welcome back <%= @current_user.email %>. <%= link("Home", to: "/") %> +Welcome back {@current_user.email}. {link("Home", to: "/")} diff --git a/dev/dev_web/templates/layout/app.html.heex b/dev/dev_web/templates/layout/app.html.heex index 78ab6e2f..c9584bc2 100644 --- a/dev/dev_web/templates/layout/app.html.heex +++ b/dev/dev_web/templates/layout/app.html.heex @@ -1,5 +1,5 @@
- - - <%= @inner_content %> + + + {@inner_content}
diff --git a/dev/dev_web/templates/layout/live.html.heex b/dev/dev_web/templates/layout/live.html.heex index 40d24f9a..d16959fa 100644 --- a/dev/dev_web/templates/layout/live.html.heex +++ b/dev/dev_web/templates/layout/live.html.heex @@ -1,11 +1,11 @@
- <%= @inner_content %> + {@inner_content}
diff --git a/dev/dev_web/templates/layout/root.html.heex b/dev/dev_web/templates/layout/root.html.heex index 00ae978e..6b01d38d 100644 --- a/dev/dev_web/templates/layout/root.html.heex +++ b/dev/dev_web/templates/layout/root.html.heex @@ -4,9 +4,9 @@ - <%= csrf_meta_tag() %> + {csrf_meta_tag()} <.live_title> - <%= assigns[:page_title] || "Dev" %> + {assigns[:page_title] || "Dev"} @@ -22,6 +22,6 @@ - <%= @inner_content %> + {@inner_content} diff --git a/lib/ash_authentication_phoenix/components/apple.ex b/lib/ash_authentication_phoenix/components/apple.ex index 5a567d17..3e6bd1d6 100644 --- a/lib/ash_authentication_phoenix/components/apple.ex +++ b/lib/ash_authentication_phoenix/components/apple.ex @@ -61,7 +61,7 @@ defmodule AshAuthentication.Phoenix.Components.Apple do def icon(assigns) do ~H""" - <%= raw(icon_svg(@icon, override_for(@overrides, :icon_class))) %> + {raw(icon_svg(@icon, override_for(@overrides, :icon_class)))} """ end diff --git a/lib/ash_authentication_phoenix/components/banner.ex b/lib/ash_authentication_phoenix/components/banner.ex index 5abd27ef..639c50ef 100644 --- a/lib/ash_authentication_phoenix/components/banner.ex +++ b/lib/ash_authentication_phoenix/components/banner.ex @@ -61,12 +61,12 @@ defmodule AshAuthentication.Phoenix.Components.Banner do <% {nil, nil} -> %> <% {nil, txt} -> %>
- <%= txt %> + {txt}
<% {hrf, txt} -> %>
- <%= txt %> + {txt}
<% end %> diff --git a/lib/ash_authentication_phoenix/components/horizontal_rule.ex b/lib/ash_authentication_phoenix/components/horizontal_rule.ex index f860ec77..abeb9dcb 100644 --- a/lib/ash_authentication_phoenix/components/horizontal_rule.ex +++ b/lib/ash_authentication_phoenix/components/horizontal_rule.ex @@ -42,7 +42,7 @@ defmodule AshAuthentication.Phoenix.Components.HorizontalRule do
- <%= override_for(@overrides, :text) %> + {override_for(@overrides, :text)}
diff --git a/lib/ash_authentication_phoenix/components/magic_link.ex b/lib/ash_authentication_phoenix/components/magic_link.ex index 1f0a8c0f..22c2f488 100644 --- a/lib/ash_authentication_phoenix/components/magic_link.ex +++ b/lib/ash_authentication_phoenix/components/magic_link.ex @@ -76,7 +76,7 @@ defmodule AshAuthentication.Phoenix.Components.MagicLink do ~H"""
<%= if @label do %> -

<%= @label %>

+

{@label}

<% end %> <.form diff --git a/lib/ash_authentication_phoenix/components/oauth2.ex b/lib/ash_authentication_phoenix/components/oauth2.ex index 9e9e2491..301d7a43 100644 --- a/lib/ash_authentication_phoenix/components/oauth2.ex +++ b/lib/ash_authentication_phoenix/components/oauth2.ex @@ -50,8 +50,7 @@ defmodule AshAuthentication.Phoenix.Components.OAuth2 do href={auth_path(@socket, @subject_name, @auth_routes_prefix, @strategy, :request)} class={override_for(@overrides, :link_class)} > - <.icon icon={@strategy.icon} overrides={@overrides} /> - Sign in with <%= strategy_name(@strategy) %> + <.icon icon={@strategy.icon} overrides={@overrides} /> Sign in with {strategy_name(@strategy)}
""" @@ -60,7 +59,7 @@ defmodule AshAuthentication.Phoenix.Components.OAuth2 do def icon(assigns) do ~H""" <%= if @icon do %> - <%= raw(icon_svg(@icon, override_for(@overrides, :icon_class))) %> + {raw(icon_svg(@icon, override_for(@overrides, :icon_class)))} <% end %> """ end diff --git a/lib/ash_authentication_phoenix/components/password.ex b/lib/ash_authentication_phoenix/components/password.ex index 6bdbe44c..b80ab885 100644 --- a/lib/ash_authentication_phoenix/components/password.ex +++ b/lib/ash_authentication_phoenix/components/password.ex @@ -173,7 +173,7 @@ defmodule AshAuthentication.Phoenix.Components.Password do > <%= if @sign_in_extra do %>
- <%= render_slot(@sign_in_extra, form) %> + {render_slot(@sign_in_extra, form)}
<% end %> @@ -219,7 +219,7 @@ defmodule AshAuthentication.Phoenix.Components.Password do > <%= if @register_extra do %>
- <%= render_slot(@register_extra, form) %> + {render_slot(@register_extra, form)}
<% end %> @@ -262,7 +262,7 @@ defmodule AshAuthentication.Phoenix.Components.Password do > <%= if @reset_extra do %>
- <%= render_slot(@reset_extra, form) %> + {render_slot(@reset_extra, form)}
<% end %> @@ -308,13 +308,13 @@ defmodule AshAuthentication.Phoenix.Components.Password do if assigns[:to] do ~H""" <.link patch={@to} class={override_for(@overrides, :toggler_class)}> - <%= @message %> + {@message} """ else ~H""" - <%= @message %> + {@message} """ end diff --git a/lib/ash_authentication_phoenix/components/password/input.ex b/lib/ash_authentication_phoenix/components/password/input.ex index 3b2cd23d..0e0499a1 100644 --- a/lib/ash_authentication_phoenix/components/password/input.ex +++ b/lib/ash_authentication_phoenix/components/password/input.ex @@ -88,16 +88,16 @@ defmodule AshAuthentication.Phoenix.Components.Password.Input do ~H"""
- <%= label(@form, @identity_field, override_for(@overrides, :identity_input_label), + {label(@form, @identity_field, override_for(@overrides, :identity_input_label), class: override_for(@overrides, :label_class) - ) %> - <%= text_input(@form, @identity_field, + )} + {text_input(@form, @identity_field, type: to_string(@input_type), class: @input_class, phx_debounce: override_for(@overrides, :input_debounce), autofocus: "true", placeholder: override_for(@overrides, :identity_input_placeholder) - ) %> + )} <.error form={@form} field={@identity_field} overrides={@overrides} />
""" @@ -141,14 +141,14 @@ defmodule AshAuthentication.Phoenix.Components.Password.Input do ~H"""
- <%= label(@form, @password_field, override_for(@overrides, :password_input_label), + {label(@form, @password_field, override_for(@overrides, :password_input_label), class: override_for(@overrides, :label_class) - ) %> - <%= password_input(@form, @password_field, + )} + {password_input(@form, @password_field, class: @input_class, value: input_value(@form, @password_field), phx_debounce: override_for(@overrides, :input_debounce) - ) %> + )} <.error form={@form} field={@password_field} overrides={@overrides} />
""" @@ -192,17 +192,17 @@ defmodule AshAuthentication.Phoenix.Components.Password.Input do ~H"""
- <%= label( + {label( @form, @password_confirmation_field, override_for(@overrides, :password_confirmation_input_label), class: override_for(@overrides, :label_class) - ) %> - <%= password_input(@form, @password_confirmation_field, + )} + {password_input(@form, @password_confirmation_field, class: @input_class, value: input_value(@form, @password_confirmation_field), phx_debounce: override_for(@overrides, :input_debounce) - ) %> + )} <.error form={@form} field={@password_confirmation_field} overrides={@overrides} />
""" @@ -269,10 +269,10 @@ defmodule AshAuthentication.Phoenix.Components.Password.Input do |> assign_new(:disable_text, fn -> nil end) ~H""" - <%= submit(@label, + {submit(@label, class: override_for(@overrides, :submit_class), phx_disable_with: @disable_text - ) %> + )} """ end @@ -310,7 +310,7 @@ defmodule AshAuthentication.Phoenix.Components.Password.Input do diff --git a/lib/ash_authentication_phoenix/components/password/register_form.ex b/lib/ash_authentication_phoenix/components/password/register_form.ex index 0085b06a..54efb499 100644 --- a/lib/ash_authentication_phoenix/components/password/register_form.ex +++ b/lib/ash_authentication_phoenix/components/password/register_form.ex @@ -95,7 +95,7 @@ defmodule AshAuthentication.Phoenix.Components.Password.RegisterForm do
<%= if @label do %>

- <%= @label %> + {@label}

<% end %> @@ -119,7 +119,7 @@ defmodule AshAuthentication.Phoenix.Components.Password.RegisterForm do <%= if @inner_block do %>
- <%= render_slot(@inner_block, form) %> + {render_slot(@inner_block, form)}
<% end %> diff --git a/lib/ash_authentication_phoenix/components/password/reset_form.ex b/lib/ash_authentication_phoenix/components/password/reset_form.ex index 92248367..1141e2aa 100644 --- a/lib/ash_authentication_phoenix/components/password/reset_form.ex +++ b/lib/ash_authentication_phoenix/components/password/reset_form.ex @@ -79,7 +79,7 @@ defmodule AshAuthentication.Phoenix.Components.Password.ResetForm do
<%= if @label do %>

- <%= @label %> + {@label}

<% end %> @@ -105,7 +105,7 @@ defmodule AshAuthentication.Phoenix.Components.Password.ResetForm do <%= if @inner_block do %>
- <%= render_slot(@inner_block, form) %> + {render_slot(@inner_block, form)}
<% end %> diff --git a/lib/ash_authentication_phoenix/components/password/sign_in_form.ex b/lib/ash_authentication_phoenix/components/password/sign_in_form.ex index 4b43bb99..297a19c6 100644 --- a/lib/ash_authentication_phoenix/components/password/sign_in_form.ex +++ b/lib/ash_authentication_phoenix/components/password/sign_in_form.ex @@ -96,7 +96,7 @@ defmodule AshAuthentication.Phoenix.Components.Password.SignInForm do ~H"""
<%= if @label do %> -

<%= @label %>

+

{@label}

<% end %> <.form @@ -116,7 +116,7 @@ defmodule AshAuthentication.Phoenix.Components.Password.SignInForm do <%= if @inner_block do %>
- <%= render_slot(@inner_block, form) %> + {render_slot(@inner_block, form)}
<% end %> diff --git a/lib/ash_authentication_phoenix/components/reset/form.ex b/lib/ash_authentication_phoenix/components/reset/form.ex index bbebd018..7c5b09e1 100644 --- a/lib/ash_authentication_phoenix/components/reset/form.ex +++ b/lib/ash_authentication_phoenix/components/reset/form.ex @@ -95,7 +95,7 @@ defmodule AshAuthentication.Phoenix.Components.Reset.Form do ~H"""
<%= if @label do %> -

<%= @label %>

+

{@label}

<% end %> <.form @@ -117,7 +117,7 @@ defmodule AshAuthentication.Phoenix.Components.Reset.Form do method="POST" class={override_for(@overrides, :form_class)} > - <%= hidden_input(form, :reset_token, value: @token) %> + {hidden_input(form, :reset_token, value: @token)} diff --git a/lib/ash_authentication_phoenix/templates/live.html.heex b/lib/ash_authentication_phoenix/templates/live.html.heex index bbf68027..3772f173 100644 --- a/lib/ash_authentication_phoenix/templates/live.html.heex +++ b/lib/ash_authentication_phoenix/templates/live.html.heex @@ -6,7 +6,7 @@ phx-click="lv:clear-flash" phx-value-key="info" > - <%= Phoenix.Flash.get(@flash, :info) %> + {Phoenix.Flash.get(@flash, :info)}

<% end %> @@ -18,8 +18,8 @@ phx-click="lv:clear-flash" phx-value-key="error" > - <%= Phoenix.Flash.get(@flash, :error) %> + {Phoenix.Flash.get(@flash, :error)}

<% end %> -<%= @inner_content %> +{@inner_content} diff --git a/test/support/phoenix.ex b/test/support/phoenix.ex index a51fed8b..0b4cdc2e 100644 --- a/test/support/phoenix.ex +++ b/test/support/phoenix.ex @@ -32,14 +32,14 @@ defmodule AshAuthentication.Phoenix.Test.HomeLive do - <%= @inner_content %> + {@inner_content} """ end @impl true def render(assigns) do ~H""" - <%= @count %> + {@count} """