diff --git a/extra/lib/plausible_web/live/funnel_settings.ex b/extra/lib/plausible_web/live/funnel_settings.ex index 2a00a028b6b3..1d51ad1bf46b 100644 --- a/extra/lib/plausible_web/live/funnel_settings.ex +++ b/extra/lib/plausible_web/live/funnel_settings.ex @@ -43,7 +43,7 @@ defmodule PlausibleWeb.Live.FunnelSettings do
<.flash_messages flash={@flash} /> <%= if @add_funnel? do %> - <%= live_render( + {live_render( @socket, PlausibleWeb.Live.FunnelSettings.Form, id: "funnels-form", @@ -51,7 +51,7 @@ defmodule PlausibleWeb.Live.FunnelSettings do "current_user_id" => @current_user_id, "domain" => @domain } - ) %> + )} <% else %>
= Funnel.min_steps()}> <.live_component @@ -64,11 +64,11 @@ defmodule PlausibleWeb.Live.FunnelSettings do
- You need to define at least two goals to create a funnel. Go ahead and <%= link( + You need to define at least two goals to create a funnel. Go ahead and {link( "add goals", to: PlausibleWeb.Router.Helpers.site_path(@socket, :settings_goals, @domain), class: "text-indigo-500 w-full text-center" - ) %> to proceed. + )} to proceed.
<% end %> diff --git a/extra/lib/plausible_web/live/funnel_settings/form.ex b/extra/lib/plausible_web/live/funnel_settings/form.ex index e3f5248a5ea9..b3a8639adf47 100644 --- a/extra/lib/plausible_web/live/funnel_settings/form.ex +++ b/extra/lib/plausible_web/live/funnel_settings/form.ex @@ -121,7 +121,7 @@ defmodule PlausibleWeb.Live.FunnelSettings.Form do Last month conversion rate: <%= List.last(@evaluation_result.steps).conversion_rate %>% <% else %> - Choose minimum <%= Funnel.min_steps() %> steps to evaluate funnel. + Choose minimum {Funnel.min_steps()} steps to evaluate funnel. <% end %>

@@ -196,11 +196,11 @@ defmodule PlausibleWeb.Live.FunnelSettings.Form do class="border-dotted border-b border-gray-400 " tooltip="Sample calculation for last month" > - Entering Visitors: <%= @result.entering_visitors %> + Entering Visitors: {@result.entering_visitors} 0}> - Dropoff: <%= Map.get(step, :dropoff_percentage) %>% + Dropoff: {Map.get(step, :dropoff_percentage)}% """ diff --git a/extra/lib/plausible_web/live/funnel_settings/list.ex b/extra/lib/plausible_web/live/funnel_settings/list.ex index a1fcc2aec24e..8227543ab411 100644 --- a/extra/lib/plausible_web/live/funnel_settings/list.ex +++ b/extra/lib/plausible_web/live/funnel_settings/list.ex @@ -49,9 +49,9 @@ defmodule PlausibleWeb.Live.FunnelSettings.List do <%= for funnel <- @funnels do %>
- <%= funnel.name %> + {funnel.name} - <%= funnel.steps_count %>-step funnel + {funnel.steps_count}-step funnel
@@ -154,7 +154,7 @@ defmodule PlausibleWeb.Components.Billing do ~H""" - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)}
""" @@ -170,11 +170,11 @@ defmodule PlausibleWeb.Components.Billing do ~H""" - <%= @title %> + {@title} - <%= Cldr.Number.to_string!(@usage) %> - <%= if is_number(@limit), do: "/ #{Cldr.Number.to_string!(@limit)}" %> + {Cldr.Number.to_string!(@usage)} + {if is_number(@limit), do: "/ #{Cldr.Number.to_string!(@limit)}"} """ @@ -189,7 +189,7 @@ defmodule PlausibleWeb.Components.Billing do >

Monthly quota

- <%= PlausibleWeb.AuthView.subscription_quota(@subscription, format: :long) %> + {PlausibleWeb.AuthView.subscription_quota(@subscription, format: :long)}
<.styled_link :if={ @@ -198,7 +198,7 @@ defmodule PlausibleWeb.Components.Billing do id="#upgrade-or-change-plan-link" href={Routes.billing_path(PlausibleWeb.Endpoint, :choose_plan)} > - <%= change_plan_or_upgrade_text(@subscription) %> + {change_plan_or_upgrade_text(@subscription)}
""" @@ -208,13 +208,13 @@ defmodule PlausibleWeb.Components.Billing do ~H""" """ @@ -249,7 +249,7 @@ defmodule PlausibleWeb.Components.Billing do @checkout_disabled && "pointer-events-none bg-gray-400 dark:bg-gray-600" ]} > - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ end diff --git a/lib/plausible_web/components/billing/notice.ex b/lib/plausible_web/components/billing/notice.ex index 4856b87beafc..857ed6d226aa 100644 --- a/lib/plausible_web/components/billing/notice.ex +++ b/lib/plausible_web/components/billing/notice.ex @@ -30,7 +30,7 @@ defmodule PlausibleWeb.Components.Billing.Notice do ~H"""
@@ -79,7 +79,7 @@ defmodule PlausibleWeb.Components.Billing.PlanBox do id="highlight-pill" class="rounded-full bg-indigo-600/10 px-2.5 py-1 text-xs font-semibold leading-5 text-indigo-600 dark:text-indigo-300 dark:ring-1 dark:ring-indigo-300/50" > - <%= @text %> + {@text}

""" @@ -123,7 +123,7 @@ defmodule PlausibleWeb.Components.Billing.PlanBox do id={"#{@kind}-price-tag-amount"} class="text-4xl font-bold tracking-tight text-gray-900 dark:text-gray-100" > - <%= @plan_to_render.monthly_cost |> Plausible.Billing.format_price() %> + {@plan_to_render.monthly_cost |> Plausible.Billing.format_price()} - <%= @plan_to_render.monthly_cost |> Money.mult!(12) |> Plausible.Billing.format_price() %> + {@plan_to_render.monthly_cost |> Money.mult!(12) |> Plausible.Billing.format_price()} - <%= @plan_to_render.yearly_cost |> Plausible.Billing.format_price() %> + {@plan_to_render.yearly_cost |> Plausible.Billing.format_price()} /year @@ -218,16 +218,16 @@ defmodule PlausibleWeb.Components.Billing.PlanBox do > <%= if @exceeded_plan_limits != [] do %> - <%= @disabled_message %> + {@disabled_message} <:tooltip_content> Your usage exceeds the following limit(s):

- <%= Phoenix.Naming.humanize(limit) %>
+ {Phoenix.Naming.humanize(limit)}

<% else %> - <%= @disabled_message %> + {@disabled_message} <% end %>

""" @@ -320,7 +320,7 @@ defmodule PlausibleWeb.Components.Billing.PlanBox do @checkout_disabled && "pointer-events-none bg-gray-400 dark:bg-gray-600" ]} > - <%= @change_plan_link_text %> + {@change_plan_link_text} """ end diff --git a/lib/plausible_web/components/first_dashboard_launch_banner.ex b/lib/plausible_web/components/first_dashboard_launch_banner.ex index f4ed01c43c7b..b38ac6039d1b 100644 --- a/lib/plausible_web/components/first_dashboard_launch_banner.ex +++ b/lib/plausible_web/components/first_dashboard_launch_banner.ex @@ -28,10 +28,10 @@ defmodule PlausibleWeb.Components.FirstDashboardLaunchBanner do x-bind:class="! show ? 'hidden' : ''" x-init={x_init(@site)} > - <%= link("Team members, email reports and GA import. Explore more →", + {link("Team members, email reports and GA import. Explore more →", to: "/#{URI.encode_www_form(@site.domain)}/settings/email-reports", class: "py-2 block" - ) %> + )} """ end diff --git a/lib/plausible_web/components/generic.ex b/lib/plausible_web/components/generic.ex index ff1908ad994f..853b24ec03f9 100644 --- a/lib/plausible_web/components/generic.ex +++ b/lib/plausible_web/components/generic.ex @@ -55,7 +55,7 @@ defmodule PlausibleWeb.Components.Generic do ]} {@rest} > - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ end @@ -101,7 +101,7 @@ defmodule PlausibleWeb.Components.Generic do ]} {@rest} > - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ end @@ -154,11 +154,11 @@ defmodule PlausibleWeb.Components.Generic do

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

- <%= render_slot(@inner_block) %> + {render_slot(@inner_block)}

@@ -191,7 +191,7 @@ defmodule PlausibleWeb.Components.Generic do class={"text-indigo-600 hover:text-indigo-700 dark:text-indigo-500 dark:hover:text-indigo-600 " <> @class} {@rest} > - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ end @@ -212,7 +212,7 @@ defmodule PlausibleWeb.Components.Generic do x-on:focusin.window="! $refs.panel.contains($event.target) && close()" > """ @@ -253,7 +253,7 @@ defmodule PlausibleWeb.Components.Generic do ~H""" <.unstyled_link new_tab={@new_tab} href={@href} x-on:click="close()" class={@class} {@rest}> - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ end @@ -281,14 +281,14 @@ defmodule PlausibleWeb.Components.Generic do rel="noopener noreferrer" {@rest} > - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ else ~H""" <.link class={@class} href={@href} {@rest}> - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ end @@ -333,14 +333,14 @@ defmodule PlausibleWeb.Components.Generic do x-on:mouseout="hovered = false" class={["cursor-pointer flex align-items-center", @class]} > - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)}

- <%= render_slot(List.first(@tooltip_content)) %> + {render_slot(List.first(@tooltip_content))} """ diff --git a/lib/plausible_web/components/site/feature.ex b/lib/plausible_web/components/site/feature.ex index c751f02bb3f4..943786ba68c4 100644 --- a/lib/plausible_web/components/site/feature.ex +++ b/lib/plausible_web/components/site/feature.ex @@ -34,11 +34,11 @@ defmodule PlausibleWeb.Components.Site.Feature do else: "text-gray-900 dark:text-gray-100" ) ]}> - Show <%= @feature_mod.display_name() %> in the Dashboard + Show {@feature_mod.display_name()} in the Dashboard
- <%= render_slot(@inner_block) %> + {render_slot(@inner_block)}
""" diff --git a/lib/plausible_web/components/two_factor.ex b/lib/plausible_web/components/two_factor.ex index 2233ddd5a89e..1e3367f2307d 100644 --- a/lib/plausible_web/components/two_factor.ex +++ b/lib/plausible_web/components/two_factor.ex @@ -16,7 +16,7 @@ defmodule PlausibleWeb.Components.TwoFactor do assigns = assign(assigns, :code, qr_code) ~H""" - <%= Phoenix.HTML.raw(@code) %> + {Phoenix.HTML.raw(@code)} """ end @@ -28,7 +28,7 @@ defmodule PlausibleWeb.Components.TwoFactor do def verify_2fa_input(assigns) do ~H"""
- <%= Phoenix.HTML.Form.text_input(@form, @field, + {Phoenix.HTML.Form.text_input(@form, @field, autocomplete: "off", class: "font-mono tracking-[0.5em] w-36 pl-5 font-medium shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block border-gray-300 dark:border-gray-500 dark:text-gray-200 dark:bg-gray-900 rounded-l-md", @@ -40,7 +40,7 @@ defmodule PlausibleWeb.Components.TwoFactor do placeholder: "••••••", value: "", required: "required" - ) %> + )}
- <%= render_slot(@icon) %> + {render_slot(@icon)}
- <%= render_slot(@inner_block, f) %> + {render_slot(@inner_block, f)}
- <%= render_slot(@buttons) %> + {render_slot(@buttons)}
@@ -160,8 +160,8 @@ defmodule PlausibleWeb.Live.CSVImport do defp dates(assigns) do ~H""" - <%= @range.first %> - to <%= @range.last %> + {@range.first} + to {@range.last} """ end @@ -191,15 +191,15 @@ defmodule PlausibleWeb.Live.CSVImport do if(@status == :error, do: "text-red-600 dark:text-red-700") ]}> <%= if @upload do %> - <%= @upload.client_name %> + {@upload.client_name} <% else %> - <%= @table %>_YYYYMMDD_YYYYMMDD.csv + {@table}_YYYYMMDD_YYYYMMDD.csv <% end %>

- <%= error_to_string(error) %> + {error_to_string(error)}

""" diff --git a/lib/plausible_web/live/flash.ex b/lib/plausible_web/live/flash.ex index 2a9c5c8faeaa..d9c53a427156 100644 --- a/lib/plausible_web/live/flash.ex +++ b/lib/plausible_web/live/flash.ex @@ -55,10 +55,10 @@ defmodule PlausibleWeb.Live.Flash do <.icon_success /> <:title> - <%= Flash.get(@flash, :success_title) || "Success!" %> + {Flash.get(@flash, :success_title) || "Success!"} <:message> - <%= Flash.get(@flash, :success) %> + {Flash.get(@flash, :success)} <.flash :if={Flash.get(@flash, :error)} key="error"> @@ -66,10 +66,10 @@ defmodule PlausibleWeb.Live.Flash do <.icon_error /> <:title> - <%= Flash.get(@flash, :error_title) || "Error!" %> + {Flash.get(@flash, :error_title) || "Error!"} <:message> - <%= Flash.get(@flash, :error) %> + {Flash.get(@flash, :error)} <.flash @@ -96,7 +96,7 @@ defmodule PlausibleWeb.Live.Flash do end slot(:icon, required: true) - slot(:title, require: true) + slot(:title, required: true) slot(:message, required: true) attr(:key, :string, default: nil) attr(:on_close, :any, default: "lv:clear-flash") @@ -115,13 +115,13 @@ defmodule PlausibleWeb.Live.Flash do
- <%= render_slot(@icon) %> + {render_slot(@icon)}

- <%= render_slot(@title) %> + {render_slot(@title)}

- <%= render_slot(@message) %> + {render_slot(@message)}

diff --git a/lib/plausible_web/live/goal_settings/form.ex b/lib/plausible_web/live/goal_settings/form.ex index 3f140a3938c6..3639323bbb4c 100644 --- a/lib/plausible_web/live/goal_settings/form.ex +++ b/lib/plausible_web/live/goal_settings/form.ex @@ -60,7 +60,7 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do x-show="tabSelectionInProgress" /> -

Add Goal for <%= @domain %>

+

Add Goal for {@domain}

<.tabs selected_tab={@selected_tab} myself={@myself} /> @@ -99,7 +99,7 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do phx-target={@myself} > 1}> - Already sending custom events? We've found <%= @event_name_options_count %> custom events from the last 6 months that are not yet configured as goals. Click here to add them. + Already sending custom events? We've found {@event_name_options_count} custom events from the last 6 months that are not yet configured as goals. Click here to add them. Already sending custom events? We've found 1 custom event from the last 6 months that is not yet configured as a goal. Click here to add it. @@ -135,9 +135,9 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do /> <.error :for={{msg, opts} <- @f[:page_path].errors}> - <%= Enum.reduce(opts, msg, fn {key, value}, acc -> + {Enum.reduce(opts, msg, fn {key, value}, acc -> String.replace(acc, "%{#{key}}", fn _ -> to_string(value) end) - end) %> + end)}
""" @@ -263,9 +263,9 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do
<.error :for={{msg, opts} <- @f[:event_name].errors}> - <%= Enum.reduce(opts, msg, fn {key, value}, acc -> + {Enum.reduce(opts, msg, fn {key, value}, acc -> String.replace(acc, "%{#{key}}", fn _ -> to_string(value) end) - end) %> + end)}
diff --git a/lib/plausible_web/live/goal_settings/list.ex b/lib/plausible_web/live/goal_settings/list.ex index 8bbb8e723cfd..2eec25d49d57 100644 --- a/lib/plausible_web/live/goal_settings/list.ex +++ b/lib/plausible_web/live/goal_settings/list.ex @@ -63,10 +63,10 @@ defmodule PlausibleWeb.Live.GoalSettings.List do <%= if not @revenue_goals_enabled? && goal.currency do %>
- <%= goal %> + {goal}
<% else %> - <%= goal %> + {goal} <% end %> Pageview diff --git a/lib/plausible_web/live/imports_exports_settings.ex b/lib/plausible_web/live/imports_exports_settings.ex index b1c822ba3394..caf4b0f47bf0 100644 --- a/lib/plausible_web/live/imports_exports_settings.ex +++ b/lib/plausible_web/live/imports_exports_settings.ex @@ -94,7 +94,7 @@ defmodule PlausibleWeb.Live.ImportsExportsSettings do

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

@@ -102,7 +102,7 @@ defmodule PlausibleWeb.Live.ImportsExportsSettings do Existing Imports

- A maximum of <%= @max_imports %> imports at any time is allowed. + A maximum of {@max_imports} imports at any time is allowed.

@@ -151,30 +151,28 @@ defmodule PlausibleWeb.Live.ImportsExportsSettings do Import failed - <.tooltip :if={@entry.tooltip} wrapper_class={[@label_class, "grow"]} class="justify-left"> - <%= Plausible.Imported.SiteImport.label(@entry.site_import) %> + {Plausible.Imported.SiteImport.label(@entry.site_import)} <:tooltip_content> <.notice_message message_label={@entry.tooltip} />
- <%= Plausible.Imported.SiteImport.label(@entry.site_import) %> + {Plausible.Imported.SiteImport.label(@entry.site_import)}
- (<%= PlausibleWeb.StatsView.large_number_format( + ({PlausibleWeb.StatsView.large_number_format( pageview_count(@entry.site_import, @pageview_counts) - ) %> page views) + )} page views)
- From <%= format_date(@entry.site_import.start_date) %> to <%= format_date( - @entry.site_import.end_date - ) %> + From {format_date(@entry.site_import.start_date)} to {format_date(@entry.site_import.end_date)} <%= if @entry.live_status == SiteImport.completed() do %> (imported <% else %> (started <% end %> - on <%= format_date(@entry.site_import.inserted_at) %>) + on {format_date(@entry.site_import.inserted_at)})
<.button diff --git a/lib/plausible_web/live/plugins/api/settings.ex b/lib/plausible_web/live/plugins/api/settings.ex index c9bbb25c1e9d..8c705dcb9150 100644 --- a/lib/plausible_web/live/plugins/api/settings.ex +++ b/lib/plausible_web/live/plugins/api/settings.ex @@ -37,7 +37,7 @@ defmodule PlausibleWeb.Live.Plugins.API.Settings do <.flash_messages flash={@flash} /> <%= if @add_token? do %> - <%= live_render( + {live_render( @socket, PlausibleWeb.Live.Plugins.API.TokenForm, id: "token-form", @@ -47,7 +47,7 @@ defmodule PlausibleWeb.Live.Plugins.API.Settings do "token_description" => @token_description, "rendered_by" => self() } - ) %> + )} <% end %>
@@ -94,14 +94,14 @@ defmodule PlausibleWeb.Live.Plugins.API.Settings do - <%= token.description %> + {token.description} - **********<%= token.hint %> + **********{token.hint} - <%= Plausible.Plugins.API.Token.last_used_humanize(token) %> + {Plausible.Plugins.API.Token.last_used_humanize(token)}
diff --git a/lib/plausible_web/live/props_settings/list.ex b/lib/plausible_web/live/props_settings/list.ex index 4840d69991b0..b05d4b9d2ef8 100644 --- a/lib/plausible_web/live/props_settings/list.ex +++ b/lib/plausible_web/live/props_settings/list.ex @@ -47,7 +47,7 @@ defmodule PlausibleWeb.Live.PropsSettings.List do