diff --git a/elixir/apps/web/lib/web/components/core_components.ex b/elixir/apps/web/lib/web/components/core_components.ex
index 827ed0b7e..6e76fcb76 100644
--- a/elixir/apps/web/lib/web/components/core_components.ex
+++ b/elixir/apps/web/lib/web/components/core_components.ex
@@ -21,7 +21,7 @@ defmodule Web.CoreComponents do
- <%= @text %>
+ {@text}
"""
@@ -49,7 +49,7 @@ defmodule Web.CoreComponents do
"""
def p(assigns) do
~H"""
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -207,7 +207,7 @@ defmodule Web.CoreComponents do
<%= if tab.icon do %>
<.icon name={tab.icon} class="h-4 w-4 mr-2" />
<% end %>
- <%= tab.label %>
+ {tab.label}
@@ -222,7 +222,7 @@ defmodule Web.CoreComponents do
role="tabpanel"
aria-labelledby={"#{tab.id}-tab"}
>
- <%= render_slot(tab) %>
+ {render_slot(tab)}
<% end %>
@@ -258,16 +258,16 @@ defmodule Web.CoreComponents do
- <%= render_slot(@title) %>
+ {render_slot(@title)}
- <%= render_slot(@actions) %>
+ {render_slot(@actions)}
- <%= render_slot(help) %>
+ {render_slot(help)}
"""
@@ -281,7 +281,7 @@ defmodule Web.CoreComponents do
<.flash kind={:info} flash={@flash} />
<.flash kind={:info} phx-mounted={show("#flash")}>Welcome Back!
"""
- attr :id, :string, default: "flash", doc: "the optional id of flash container"
+ attr :id, :string, default: nil, doc: "the optional id of flash container"
attr :flash, :map, default: %{}, doc: "the map of flash messages to display"
attr :title, :string, default: nil
@@ -315,9 +315,9 @@ defmodule Web.CoreComponents do
<.icon :if={@kind == :info} name="hero-information-circle-mini" class="h-4 w-4" />
<.icon :if={@kind == :error} name="hero-exclamation-circle-mini" class="h-4 w-4" />
- <%= @title %>
+ {@title}
- <%= maybe_render_changeset_as_flash(msg) %>
+ {maybe_render_changeset_as_flash(msg)}
"""
end
@@ -326,10 +326,10 @@ defmodule Web.CoreComponents do
assigns = %{message: message, errors: errors}
~H"""
- <%= @message %>:
+ {@message}:
-
- <%= field %>: <%= Enum.join(field_errors, ", ") %>
+ {field}: {Enum.join(field_errors, ", ")}
"""
@@ -375,7 +375,7 @@ defmodule Web.CoreComponents do
def label(assigns) do
~H"""
"""
end
@@ -400,7 +400,7 @@ defmodule Web.CoreComponents do
{@rest}
>
<.icon name="hero-exclamation-circle-mini" class="h-4 w-4 flex-none" />
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -428,7 +428,7 @@ defmodule Web.CoreComponents do
{@rest}
>
<.icon name="hero-exclamation-circle-mini" class="mt-0.5 h-5 w-5 flex-none" />
- <%= translate_error(@error) %>
+ {translate_error(@error)}
"""
end
@@ -452,8 +452,8 @@ defmodule Web.CoreComponents do
-
- <%= item.title %>
- - <%= render_slot(item) %>
+ - {item.title}
+ - {render_slot(item)}
@@ -770,20 +770,20 @@ defmodule Web.CoreComponents do
def intersperse_blocks(assigns) do
~H"""
<%= if Enum.empty?(@item) do %>
- <%= render_slot(@empty) %>
+ {render_slot(@empty)}
<% else %>
<%= for item <- Enum.intersperse(@item, :separator) do %>
<%= if item == :separator do %>
- <%= render_slot(@separator) %>
+ {render_slot(@separator)}
<% else %>
- <%= render_slot(
+ {render_slot(
item,
cond do
item == List.first(@item) -> :first
item == List.last(@item) -> :last
true -> :middle
end
- ) %>
+ )}
<% end %>
<% end %>
<% end %>
@@ -834,22 +834,22 @@ defmodule Web.CoreComponents do
~H"""
<%= if Enum.empty?(@peek.items) do %>
- <%= render_slot(@empty) %>
+ {render_slot(@empty)}
<% else %>
<% items = if @separator, do: Enum.intersperse(@peek.items, :separator), else: @peek.items %>
<%= for item <- items do %>
<%= if item == :separator do %>
- <%= render_slot(@separator) %>
+ {render_slot(@separator)}
<% else %>
- <%= render_slot(@item, item) %>
+ {render_slot(@item, item)}
<% end %>
<% end %>
<%= if @peek.count > length(@peek.items) do %>
- <%= render_slot(@tail, @peek.count - length(@peek.items)) %>
+ {render_slot(@tail, @peek.count - length(@peek.items))}
<% end %>
- <%= render_slot(@call_to_action) %>
+ {render_slot(@call_to_action)}
<% end %>
"""
@@ -882,7 +882,7 @@ defmodule Web.CoreComponents do
]}
{@rest}
>
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -932,7 +932,7 @@ defmodule Web.CoreComponents do
"text-xs rounded-l py-0.5 pl-2.5 pr-1.5",
@colors[@type]["dark"]
]}>
- <%= render_slot(@left) %>
+ {render_slot(@left)}
- <%= render_slot(@right) %>
+ {render_slot(@right)}
"""
@@ -955,7 +955,7 @@ defmodule Web.CoreComponents do
def datetime(assigns) do
~H"""
- <%= Cldr.DateTime.to_string!(@datetime, Web.CLDR, format: @format) %>
+ {Cldr.DateTime.to_string!(@datetime, Web.CLDR, format: @format)}
"""
end
@@ -980,17 +980,17 @@ defmodule Web.CoreComponents do
"underline underline-offset-2 decoration-1 decoration-dotted",
DateTime.compare(@datetime, @relative_to) == :lt && @negative_class
]}>
- <%= Cldr.DateTime.Relative.to_string!(@datetime, Web.CLDR, relative_to: @relative_to)
- |> String.capitalize() %>
+ {Cldr.DateTime.Relative.to_string!(@datetime, Web.CLDR, relative_to: @relative_to)
+ |> String.capitalize()}
<:content>
- <%= @datetime %>
+ {@datetime}
- <%= Cldr.DateTime.Relative.to_string!(@datetime, Web.CLDR, relative_to: @relative_to)
- |> String.capitalize() %>
+ {Cldr.DateTime.Relative.to_string!(@datetime, Web.CLDR, relative_to: @relative_to)
+ |> String.capitalize()}
Never
@@ -1017,7 +1017,7 @@ defmodule Web.CoreComponents do
data-popover-target-id={@target_id}
data-popover-placement={@placement}
>
- <%= render_slot(@target) %>
+ {render_slot(@target)}
- <%= render_slot(@content) %>
+ {render_slot(@content)}
@@ -1055,7 +1055,7 @@ defmodule Web.CoreComponents do
else: "Never connected"
}
>
- <%= if @schema.online?, do: "Online", else: "Offline" %>
+ {if @schema.online?, do: "Online", else: "Offline"}
"""
@@ -1184,7 +1184,7 @@ defmodule Web.CoreComponents do
class="text-accent-500 hover:underline"
navigate={~p"/#{@schema.account_id}/actors/#{@schema.verified_by_identity.actor_id}"}
>
- <%= assigns.schema.verified_by_actor.name %>
+ {assigns.schema.verified_by_actor.name}
"""
@@ -1202,7 +1202,7 @@ defmodule Web.CoreComponents do
def actor_link(%{actor: %Domain.Actors.Actor{type: :api_client}} = assigns) do
~H"""
<.link class={link_style()} navigate={~p"/#{@account}/settings/api_clients/#{@actor}"}>
- <%= assigns.actor.name %>
+ {assigns.actor.name}
"""
end
@@ -1210,7 +1210,7 @@ defmodule Web.CoreComponents do
def actor_link(assigns) do
~H"""
<.link class={link_style()} navigate={~p"/#{@account}/actors/#{@actor}"}>
- <%= assigns.actor.name %>
+ {assigns.actor.name}
"""
end
@@ -1248,7 +1248,7 @@ defmodule Web.CoreComponents do
bg-neutral-50
]}>
- <%= get_identity_email(@identity) %>
+ {get_identity_email(@identity)}
@@ -1310,7 +1310,7 @@ defmodule Web.CoreComponents do
bg-neutral-50
]}
>
- <%= @group.name %>
+ {@group.name}
"""
@@ -1324,15 +1324,15 @@ defmodule Web.CoreComponents do
def last_seen(assigns) do
~H"""
- <%= @schema.last_seen_remote_ip %>
+ {@schema.last_seen_remote_ip}
- <%= [
+ {[
Domain.Geo.country_common_name!(@schema.last_seen_remote_ip_location_region),
@schema.last_seen_remote_ip_location_city
]
|> Enum.reject(&is_nil/1)
- |> Enum.join(", ") %>
+ |> Enum.join(", ")}
- <%= Web.CLDR.Number.Cardinal.pluralize(@number, :en, @opts) %>
+ {Web.CLDR.Number.Cardinal.pluralize(@number, :en, @opts)}
"""
end
@@ -1461,10 +1461,10 @@ defmodule Web.CoreComponents do
~H"""
- <%= render_slot(@title) %>
+ {render_slot(@title)}
- <%= render_slot(@content) %>
+ {render_slot(@content)}
"""
diff --git a/elixir/apps/web/lib/web/components/form_components.ex b/elixir/apps/web/lib/web/components/form_components.ex
index 78c1ccea8..27bf07047 100644
--- a/elixir/apps/web/lib/web/components/form_components.ex
+++ b/elixir/apps/web/lib/web/components/form_components.ex
@@ -115,8 +115,8 @@ defmodule Web.FormComponents do
]}
{@rest}
/>
- <%= @label %>
- <%= if @inner_block, do: render_slot(@inner_block) %>
+ {@label}
+ {if @inner_block, do: render_slot(@inner_block)}
"""
@@ -167,10 +167,10 @@ defmodule Web.FormComponents do
]}
{@rest}
/>
- <%= @label %>
+ {@label}
<.error :for={msg <- @errors} inline={@inline_errors} data-validation-error-for={@name}>
- <%= msg %>
+ {msg}
"""
@@ -179,7 +179,7 @@ defmodule Web.FormComponents do
def input(%{type: "group_select"} = assigns) do
~H"""
- <.label :if={@label} for={@id}><%= @label %>
+ <.label :if={@label} for={@id}>{@label}
-
+
<%= for {label, options} <- @options do %>
<%= if label == nil do %>
- <%= Phoenix.HTML.Form.options_for_select(options, @value) %>
+ {Phoenix.HTML.Form.options_for_select(options, @value)}
<% else %>
<% end %>
<% end %>
<.error :for={msg <- @errors} inline={@inline_errors} data-validation-error-for={@name}>
- <%= msg %>
+ {msg}
"""
@@ -221,7 +221,7 @@ defmodule Web.FormComponents do
def input(%{type: "select"} = assigns) do
~H"""
- <.label :if={@label} for={@id}><%= @label %>
+ <.label :if={@label} for={@id}>{@label}
-
- <%= Phoenix.HTML.Form.options_for_select(@options, @value) %>
+
+ {Phoenix.HTML.Form.options_for_select(@options, @value)}
<.error :for={msg <- @errors} inline={@inline_errors} data-validation-error-for={@name}>
- <%= msg %>
+ {msg}
"""
@@ -254,7 +254,7 @@ defmodule Web.FormComponents do
def input(%{type: "textarea"} = assigns) do
~H"""
- <.label :if={@label} for={@id}><%= @label %>
+ <.label :if={@label} for={@id}>{@label}
<.error :for={msg <- @errors} inline={@inline_errors} data-validation-error-for={@name}>
- <%= msg %>
+ {msg}
"""
@@ -291,9 +291,9 @@ defmodule Web.FormComponents do
def input(%{type: "readonly"} = assigns) do
~H"""
- <.label :if={@label}><%= @label %>
+ <.label :if={@label}>{@label}
- <%= assigns.value %>
+ {assigns.value}
<.error :for={msg <- @errors} inline={@inline_errors} data-validation-error-for={@name}>
- <%= msg %>
+ {msg}
"""
@@ -313,7 +313,7 @@ defmodule Web.FormComponents do
def input(%{type: "text", prefix: prefix} = assigns) when not is_nil(prefix) do
~H"""
- <.label :if={@label} for={@id}><%= @label %>
+ <.label :if={@label} for={@id}>{@label}
- <%= @prefix %>
+ {@prefix}
<.error :for={msg <- @errors} inline={@inline_errors} data-validation-error-for={@name}>
- <%= msg %>
+ {msg}
"""
@@ -357,7 +357,7 @@ defmodule Web.FormComponents do
def input(assigns) do
~H"""
- <.label :if={@label} for={@id}><%= @label %>
+ <.label :if={@label} for={@id}>{@label}
<.error :for={msg <- @errors} inline={@inline_errors} data-validation-error-for={@name}>
- <%= msg %>
+ {msg}
"""
@@ -417,7 +417,7 @@ defmodule Web.FormComponents do
- <%= render_slot(@dialog_title) %>
+ {render_slot(@dialog_title)}
- <%= render_slot(@dialog_content) %>
+ {render_slot(@dialog_content)}
<.button
@@ -439,7 +439,7 @@ defmodule Web.FormComponents do
style="info"
class="px-5 py-2.5"
>
- <%= render_slot(@dialog_cancel_button) %>
+ {render_slot(@dialog_cancel_button)}
<.button
data-dialog-action="confirm"
@@ -450,7 +450,7 @@ defmodule Web.FormComponents do
value="confirm"
class="py-2.5 px-5 ms-3"
>
- <%= render_slot(@dialog_confirm_button) %>
+ {render_slot(@dialog_confirm_button)}
@@ -465,7 +465,7 @@ defmodule Web.FormComponents do
disabled={@disabled}
phx-hook="ConfirmDialog"
>
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -510,7 +510,7 @@ defmodule Web.FormComponents do
~H"""
<.link class={button_style(@style) ++ button_size(@size) ++ [@class]} navigate={@navigate} {@rest}>
<.icon :if={@icon} name={@icon} class="h-3.5 w-3.5 mr-2" />
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -519,7 +519,7 @@ defmodule Web.FormComponents do
~H"""
"""
end
@@ -542,7 +542,7 @@ defmodule Web.FormComponents do
~H"""
<.button type="submit" style={@style} {@rest}>
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
@@ -564,7 +564,7 @@ defmodule Web.FormComponents do
def delete_button(assigns) do
~H"""
<.button style="danger" size={@size} icon="hero-trash-solid" {@rest}>
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -585,7 +585,7 @@ defmodule Web.FormComponents do
def add_button(assigns) do
~H"""
<.button style="primary" class={@class} navigate={@navigate} icon="hero-plus">
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -605,7 +605,7 @@ defmodule Web.FormComponents do
def edit_button(assigns) do
~H"""
<.button style="primary" navigate={@navigate} icon="hero-pencil-solid">
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
diff --git a/elixir/apps/web/lib/web/components/form_components/select_with_groups.ex b/elixir/apps/web/lib/web/components/form_components/select_with_groups.ex
index 3d80c01dd..34b1f28f8 100644
--- a/elixir/apps/web/lib/web/components/form_components/select_with_groups.ex
+++ b/elixir/apps/web/lib/web/components/form_components/select_with_groups.ex
@@ -148,7 +148,7 @@ defmodule Web.Components.FormComponents.SelectWithGroups do
|> JS.set_attribute({"aria-expanded", "false"}, to: "##{@id}-input")
}
>
- <.label :if={@label} for={"#{@id}-input"}><%= @label %>
+ <.label :if={@label} for={"#{@id}-input"}>{@label}
@@ -240,7 +240,7 @@ defmodule Web.Components.FormComponents.SelectWithGroups do
<%= if @no_search_results == [] do %>
Nothing has been found.
<% else %>
- <%= render_slot(@no_search_results, @search_query) %>
+ {render_slot(@no_search_results, @search_query)}
<% end %>
- <%= render_slot(@options_group, group) %>
+ {render_slot(@options_group, group)}
@@ -314,11 +314,11 @@ defmodule Web.Components.FormComponents.SelectWithGroups do
<.error :for={message <- @errors} data-validation-error-for={@name <> "_name"}>
- <%= message %>
+ {message}
<%= if @options == [] and is_nil(@value) and @no_options != [] and @search_query in [nil, ""] do %>
- <%= render_slot(@no_options, @name <> "_name") %>
+ {render_slot(@no_options, @name <> "_name")}
<% end %>
"""
diff --git a/elixir/apps/web/lib/web/components/layouts/app.html.heex b/elixir/apps/web/lib/web/components/layouts/app.html.heex
index f64e04b1e..a383c91db 100644
--- a/elixir/apps/web/lib/web/components/layouts/app.html.heex
+++ b/elixir/apps/web/lib/web/components/layouts/app.html.heex
@@ -100,7 +100,7 @@
<.flash :if={@account.warning} kind={:warning} class="m-1">
- <%= @account.warning %>.
+ {@account.warning}.
Please
<.link navigate={~p"/#{@account}/settings/billing"} class={link_style()}>
@@ -128,8 +128,8 @@
<% trial_ends_in_days = DateTime.diff(trial_ends_at, DateTime.utc_now(), :day) %>
<.flash :if={5 > trial_ends_in_days and trial_ends_in_days > 0} kind={:info} class="m-1">
- Your Enterprise pilot period will expire in <%= trial_ends_in_days %>
- <%= if trial_ends_in_days == 1, do: "day", else: "days" %>.
+ Your Enterprise pilot period will expire in {trial_ends_in_days}
+ {if trial_ends_in_days == 1, do: "day", else: "days"}.
Please contact your sales representative to extend it.
@@ -139,5 +139,5 @@
<% end %>
- <%= @inner_content %>
+ {@inner_content}
diff --git a/elixir/apps/web/lib/web/components/layouts/public.html.heex b/elixir/apps/web/lib/web/components/layouts/public.html.heex
index 513af85a4..509b93af5 100644
--- a/elixir/apps/web/lib/web/components/layouts/public.html.heex
+++ b/elixir/apps/web/lib/web/components/layouts/public.html.heex
@@ -1,4 +1,4 @@
<.trackers />
- <%= @inner_content %>
+ {@inner_content}
diff --git a/elixir/apps/web/lib/web/components/layouts/root.html.heex b/elixir/apps/web/lib/web/components/layouts/root.html.heex
index f6dad3242..c2fb47890 100644
--- a/elixir/apps/web/lib/web/components/layouts/root.html.heex
+++ b/elixir/apps/web/lib/web/components/layouts/root.html.heex
@@ -11,7 +11,7 @@
<.live_title suffix=" · Firezone">
- <%= assigns[:page_title] || "Firezone" %>
+ {assigns[:page_title] || "Firezone"}
- <%= @inner_content %>
+ {@inner_content}