From 1544dbfe916b6f1c50df3ff0647890df8a6c519a Mon Sep 17 00:00:00 2001
From: "karlo.smid"
Date: Mon, 28 Apr 2025 14:40:17 +0200
Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20live=20view=201.0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
and refactor for live view test fix render_component function
---
lib/plausible_web/live/flash.ex | 2 +-
mix.exs | 4 ++--
mix.lock | 4 ++--
test/support/live_view_test_fix.ex | 4 ----
4 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/lib/plausible_web/live/flash.ex b/lib/plausible_web/live/flash.ex
index 2a9c5c8faeaa..a5cbfcd2cdd2 100644
--- a/lib/plausible_web/live/flash.ex
+++ b/lib/plausible_web/live/flash.ex
@@ -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")
diff --git a/mix.exs b/mix.exs
index fd960512f457..2986cab501d0 100644
--- a/mix.exs
+++ b/mix.exs
@@ -85,7 +85,7 @@ defmodule Plausible.MixProject do
{:ex_machina, "~> 2.3", only: [:dev, :test, :ce_dev, :ce_test]},
{:excoveralls, "~> 0.10", only: [:test, :ce_test]},
{:finch, "~> 0.17.0"},
- {:floki, "~> 0.35.0"},
+ {:floki, "~> 0.36.0"},
{:fun_with_flags, "~> 1.11.0"},
{:fun_with_flags_ui, "~> 1.0"},
{:locus, "~> 2.3"},
@@ -111,7 +111,7 @@ defmodule Plausible.MixProject do
{:phoenix_html, "~> 3.3", override: true},
{:phoenix_live_reload, "~> 1.2", only: [:dev, :ce_dev]},
{:phoenix_pubsub, "~> 2.0"},
- {:phoenix_live_view, "~> 0.18"},
+ {:phoenix_live_view, "~> 1.0"},
{:php_serializer, "~> 2.0"},
{:plug, "~> 1.13", override: true},
{:plug_cowboy, "~> 2.3"},
diff --git a/mix.lock b/mix.lock
index 1c9a8c781b5e..d5cd3fdb5d4b 100644
--- a/mix.lock
+++ b/mix.lock
@@ -54,7 +54,7 @@
"expo": {:hex, :expo, "0.5.2", "beba786aab8e3c5431813d7a44b828e7b922bfa431d6bfbada0904535342efe2", [:mix], [], "hexpm", "8c9bfa06ca017c9cb4020fabe980bc7fdb1aaec059fd004c2ab3bff03b1c599c"},
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
"finch": {:hex, :finch, "0.17.0", "17d06e1d44d891d20dbd437335eebe844e2426a0cd7e3a3e220b461127c73f70", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "8d014a661bb6a437263d4b5abf0bcbd3cf0deb26b1e8596f2a271d22e48934c7"},
- "floki": {:hex, :floki, "0.35.2", "87f8c75ed8654b9635b311774308b2760b47e9a579dabf2e4d5f1e1d42c39e0b", [:mix], [], "hexpm", "6b05289a8e9eac475f644f09c2e4ba7e19201fd002b89c28c1293e7bd16773d9"},
+ "floki": {:hex, :floki, "0.36.3", "1102f93b16a55bc5383b85ae3ec470f82dee056eaeff9195e8afdf0ef2a43c30", [:mix], [], "hexpm", "fe0158bff509e407735f6d40b3ee0d7deb47f3f3ee7c6c182ad28599f9f6b27a"},
"fun_with_flags": {:hex, :fun_with_flags, "1.11.0", "a9019d0300e9755c53111cf5b2aba640d7f0de2a8a03a0bd0c593e943c3e9ec5", [:mix], [{:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: true]}, {:redix, "~> 1.0", [hex: :redix, repo: "hexpm", optional: true]}], "hexpm", "448ec640cd1ade4728979ae5b3e7592b0fc8b0f99cf40785d048515c27d09743"},
"fun_with_flags_ui": {:hex, :fun_with_flags_ui, "1.0.0", "d764a4d1cc1233bdbb18dfb416a6ef96d0ecf4a5dc5a0201f7aa0b13cf2e7802", [:mix], [{:cowboy, ">= 2.0.0", [hex: :cowboy, repo: "hexpm", optional: true]}, {:fun_with_flags, "~> 1.11", [hex: :fun_with_flags, repo: "hexpm", optional: false]}, {:plug, "~> 1.12", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, ">= 2.0.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "b0c145894c00d65d5dc20ee5b1f18457985d1fd0b87866f0b41894d5979e55e0"},
"gen_cycle": {:hex, :gen_cycle, "1.0.4", "2315199f1256116328fad6a9d4371c2fb0bc39c7f5111b88d2de582300c931cc", [:rebar3], [], "hexpm", "67817e31b352bb00715f80a5571b3c069e26e994b2ebafa376acf76a2d0f66d8"},
@@ -114,7 +114,7 @@
"phoenix_ecto": {:hex, :phoenix_ecto, "4.4.3", "86e9878f833829c3f66da03d75254c155d91d72a201eb56ae83482328dc7ca93", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "d36c401206f3011fefd63d04e8ef626ec8791975d9d107f9a0817d426f61ac07"},
"phoenix_html": {:hex, :phoenix_html, "3.3.4", "42a09fc443bbc1da37e372a5c8e6755d046f22b9b11343bf885067357da21cb3", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "0249d3abec3714aff3415e7ee3d9786cb325be3151e6c4b3021502c585bf53fb"},
"phoenix_live_reload": {:hex, :phoenix_live_reload, "1.4.1", "2aff698f5e47369decde4357ba91fc9c37c6487a512b41732818f2204a8ef1d3", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "9bffb834e7ddf08467fe54ae58b5785507aaba6255568ae22b4d46e2bb3615ab"},
- "phoenix_live_view": {:hex, :phoenix_live_view, "0.20.3", "8b6406bc0a451f295407d7acff7f234a6314be5bbe0b3f90ed82b07f50049878", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a8e4385e05618b424779f894ed2df97d3c7518b7285fcd11979077ae6226466b"},
+ "phoenix_live_view": {:hex, :phoenix_live_view, "1.0.10", "d3d54f751ca538b17313541cabb1ab090a0d26e08ba914b49b6648022fa476f4", [:mix], [{:floki, "~> 0.36", [hex: :floki, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "13f833a39b1368117e0529c0fe5029930a9bf11e2fb805c2263fcc32950f07a2"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"},
"phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"},
"phoenix_view": {:hex, :phoenix_view, "2.0.4", "b45c9d9cf15b3a1af5fb555c674b525391b6a1fe975f040fb4d913397b31abf4", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}], "hexpm", "4e992022ce14f31fe57335db27a28154afcc94e9983266835bb3040243eb620b"},
diff --git a/test/support/live_view_test_fix.ex b/test/support/live_view_test_fix.ex
index 2fba6e185814..977f4e545b5d 100644
--- a/test/support/live_view_test_fix.ex
+++ b/test/support/live_view_test_fix.ex
@@ -32,10 +32,6 @@ defmodule Plausible.LiveViewTest do
end
end
- def __render_component__(endpoint, component, assigns, opts) when is_atom(component) do
- Phoenix.LiveViewTest.__render_component__(endpoint, %{module: component}, assigns, opts)
- end
-
def __render_component__(endpoint, component, assigns, opts) do
Phoenix.LiveViewTest.__render_component__(endpoint, component, assigns, opts)
end
From 05967c32fe847fbb228214ac7bc7ba0f98601552 Mon Sep 17 00:00:00 2001
From: "karlo.smid"
Date: Mon, 28 Apr 2025 14:46:35 +0200
Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=F0=9F=90=9B=20formatting?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../lib/plausible_web/live/funnel_settings.ex | 8 +-
.../live/funnel_settings/form.ex | 6 +-
.../live/funnel_settings/list.ex | 4 +-
.../components/billing/billing.ex | 26 +++---
.../components/billing/notice.ex | 8 +-
.../components/billing/pageview_slider.ex | 6 +-
.../components/billing/plan_benefits.ex | 2 +-
.../components/billing/plan_box.ex | 18 ++--
.../first_dashboard_launch_banner.ex | 4 +-
lib/plausible_web/components/generic.ex | 24 +++---
lib/plausible_web/components/site/feature.ex | 4 +-
lib/plausible_web/components/two_factor.ex | 14 +--
lib/plausible_web/live/choose_plan.ex | 4 +-
.../live/components/combo_box.ex | 4 +-
lib/plausible_web/live/components/form.ex | 16 ++--
lib/plausible_web/live/components/modal.ex | 2 +-
.../live/components/pagination.ex | 2 +-
.../live/components/verification.ex | 6 +-
lib/plausible_web/live/csv_export.ex | 10 +--
lib/plausible_web/live/csv_import.ex | 12 +--
lib/plausible_web/live/flash.ex | 14 +--
lib/plausible_web/live/goal_settings/form.ex | 12 +--
lib/plausible_web/live/goal_settings/list.ex | 4 +-
.../live/imports_exports_settings.ex | 18 ++--
.../live/plugins/api/settings.ex | 10 +--
.../live/plugins/api/token_form.ex | 2 +-
lib/plausible_web/live/props_settings.ex | 4 +-
lib/plausible_web/live/props_settings/form.ex | 8 +-
lib/plausible_web/live/props_settings/list.ex | 2 +-
lib/plausible_web/live/register_form.ex | 18 ++--
lib/plausible_web/live/reset_password_form.ex | 4 +-
.../live/shields/country_rules.ex | 4 +-
.../live/shields/hostname_rules.ex | 8 +-
lib/plausible_web/live/shields/ip_rules.ex | 8 +-
lib/plausible_web/live/shields/page_rules.ex | 6 +-
lib/plausible_web/live/sites.ex | 14 +--
.../auth/_onboarding_steps.html.heex | 6 +-
.../templates/auth/activate.html.heex | 34 ++++----
.../generate_2fa_recovery_codes.html.heex | 2 +-
.../password_reset_request_success.html.heex | 2 +-
.../templates/auth/user_settings.html.heex | 86 +++++++++----------
.../templates/auth/verify_2fa.html.heex | 6 +-
.../auth/verify_2fa_recovery_code.html.heex | 4 +-
.../templates/billing/choose_plan.html.heex | 4 +-
.../upgrade_to_enterprise_plan.html.heex | 18 ++--
...approaching_accept_traffic_until.html.heex | 4 +-
.../templates/email/csv_import.html.heex | 8 +-
.../email/google_analytics_import.html.heex | 8 +-
.../templates/error/server_error.html.heex | 20 ++---
.../google_analytics/confirm.html.heex | 28 +++---
.../property_or_view_form.html.heex | 16 ++--
.../user_metric_form.html.heex | 4 +-
.../templates/layout/_footer.html.heex | 4 +-
.../templates/layout/_header.html.heex | 20 ++---
.../templates/layout/_notice.html.heex | 2 +-
.../templates/layout/_settings_tab.html.heex | 2 +-
.../templates/layout/app.html.heex | 14 +--
.../templates/layout/base_error.html.heex | 10 +--
.../templates/layout/focus.html.heex | 18 ++--
.../templates/layout/site_settings.html.heex | 24 +++---
.../templates/site/change_domain.html.heex | 8 +-
.../templates/site/csv_import.html.heex | 4 +-
.../membership/invite_member_form.html.heex | 26 +++---
.../templates/site/new.html.heex | 22 ++---
.../site/settings_email_reports.html.heex | 22 ++---
.../templates/site/settings_funnels.html.heex | 4 +-
.../templates/site/settings_general.html.heex | 24 +++---
.../templates/site/settings_goals.html.heex | 4 +-
.../site/settings_imports_exports.html.heex | 8 +-
.../site/settings_integrations.html.heex | 4 +-
.../templates/site/settings_people.html.heex | 22 ++---
.../templates/site/settings_props.html.heex | 4 +-
.../site/settings_search_console.html.heex | 20 ++---
.../templates/site/settings_shields.html.heex | 16 ++--
.../site/settings_visibility.html.heex | 10 +--
.../templates/site/snippet.html.heex | 10 +--
.../templates/stats/site_locked.html.heex | 4 +-
.../stats/waiting_first_pageview.html.heex | 6 +-
78 files changed, 438 insertions(+), 440 deletions(-)
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
- <%= @name %>
+ {@name}
- <%= if @disabled,
+ {if @disabled,
do: "Not available",
- else: PlausibleWeb.TextHelpers.format_date_range(@date_range) %>
+ else: PlausibleWeb.TextHelpers.format_date_range(@date_range)}
@@ -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"""
- Up to <%= present_limit(@plan, :monthly_pageview_limit) %> monthly pageviews
+ Up to {present_limit(@plan, :monthly_pageview_limit)} monthly pageviews
- Up to <%= present_limit(@plan, :site_limit) %> sites
+ Up to {present_limit(@plan, :site_limit)} sites
- Up to <%= present_limit(@plan, :hourly_api_request_limit) %> hourly api requests
+ Up to {present_limit(@plan, :hourly_api_request_limit)} hourly api requests
"""
@@ -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"""
<.notice title="Please upgrade your account" class="shadow-md dark:shadow-none">
- In order to keep your stats running, we require you to upgrade your account. If you do not upgrade your account <%= @grace_period_end %>, we will lock your dashboard and it won't be accessible.
+ In order to keep your stats running, we require you to upgrade your account. If you do not upgrade your account {@grace_period_end}, we will lock your dashboard and it won't be accessible.
<.link
href={Routes.billing_path(PlausibleWeb.Endpoint, :choose_plan)}
class="whitespace-nowrap font-semibold"
@@ -75,7 +75,7 @@ defmodule PlausibleWeb.Components.Billing.Notice do
title="Notice"
{@rest}
>
- <%= account_label(@current_user, @billable_user) %> does not have access to <%= @feature_mod.display_name() %>. To get access to this feature,
+ {account_label(@current_user, @billable_user)} does not have access to {@feature_mod.display_name()}. To get access to this feature,
<.upgrade_call_to_action current_user={@current_user} billable_user={@billable_user} />.
"""
@@ -90,7 +90,7 @@ defmodule PlausibleWeb.Components.Billing.Notice do
def limit_exceeded(assigns) do
~H"""
<.notice {@rest} title="Notice">
- <%= account_label(@current_user, @billable_user) %> is limited to <%= @limit %> <%= @resource %>. To increase this limit,
+ {account_label(@current_user, @billable_user)} is limited to {@limit} {@resource}. To increase this limit,
<.upgrade_call_to_action current_user={@current_user} billable_user={@billable_user} />.
"""
@@ -229,7 +229,7 @@ defmodule PlausibleWeb.Components.Billing.Notice do
~H"""
<.notice title="Pending ownership transfers" class="shadow-md dark:shadow-none mt-4">
- <%= @message %> To exclude pending sites from your usage, please go to
+ {@message} To exclude pending sites from your usage, please go to
<.link href="https://plausible.io/sites" class="whitespace-nowrap font-semibold">
plausible.io/sites
diff --git a/lib/plausible_web/components/billing/pageview_slider.ex b/lib/plausible_web/components/billing/pageview_slider.ex
index f997cc0e8888..4a019ce83d91 100644
--- a/lib/plausible_web/components/billing/pageview_slider.ex
+++ b/lib/plausible_web/components/billing/pageview_slider.ex
@@ -20,7 +20,7 @@ defmodule PlausibleWeb.Components.Billing.PageviewSlider do
Up to
- <%= format_volume(@volume, @available_volumes) %>
+ {format_volume(@volume, @available_volumes)}
monthly pageviews
@@ -40,7 +40,7 @@ defmodule PlausibleWeb.Components.Billing.PageviewSlider do
diff --git a/lib/plausible_web/components/billing/plan_benefits.ex b/lib/plausible_web/components/billing/plan_benefits.ex
index 76610d891873..6c6f9edf4400 100644
--- a/lib/plausible_web/components/billing/plan_benefits.ex
+++ b/lib/plausible_web/components/billing/plan_benefits.ex
@@ -28,7 +28,7 @@ defmodule PlausibleWeb.Components.Billing.PlanBenefits do
- <%= if is_binary(benefit), do: benefit, else: benefit.(assigns) %>
+ {if is_binary(benefit), do: benefit, else: benefit.(assigns)}
"""
diff --git a/lib/plausible_web/components/billing/plan_box.ex b/lib/plausible_web/components/billing/plan_box.ex
index 887b29ae35c3..b6a8fc8e1979 100644
--- a/lib/plausible_web/components/billing/plan_box.ex
+++ b/lib/plausible_web/components/billing/plan_box.ex
@@ -32,7 +32,7 @@ defmodule PlausibleWeb.Components.Billing.PlanBox do
!@highlight && "text-gray-900 dark:text-gray-100",
@highlight && "text-indigo-600 dark:text-indigo-300"
]}>
- <%= String.capitalize(to_string(@kind)) %>
+ {String.capitalize(to_string(@kind))}
<.pill :if={@highlight} text={@highlight} />
@@ -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()"
>
- <%= render_slot(List.first(@button)) %>
+ {render_slot(List.first(@button))}
- <%= render_slot(List.first(@panel)) %>
+ {render_slot(List.first(@panel))}
"""
@@ -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)}
- <%= @title %>
+ {@title}
- <%= render_slot(@inner_block, f) %>
+ {render_slot(@inner_block, f)}
- <%= render_slot(@buttons) %>
+ {render_slot(@buttons)}
- <%= if @owned_plan,
+ {if @owned_plan,
do: "Change subscription plan",
- else: "Upgrade your account" %>
+ else: "Upgrade your account"}
diff --git a/lib/plausible_web/live/components/combo_box.ex b/lib/plausible_web/live/components/combo_box.ex
index 01d94f6a8b02..6e0a5cdc256d 100644
--- a/lib/plausible_web/live/components/combo_box.ex
+++ b/lib/plausible_web/live/components/combo_box.ex
@@ -252,9 +252,9 @@ defmodule PlausibleWeb.Live.Components.ComboBox do
class="block truncate py-2 px-3"
>
<%= if @creatable do %>
- Create "<%= @display_value %>"
+ Create "{@display_value}"
<% else %>
- <%= @display_value %>
+ {@display_value}
<% end %>
diff --git a/lib/plausible_web/live/components/form.ex b/lib/plausible_web/live/components/form.ex
index 62779a55ea1c..d7c3080200f7 100644
--- a/lib/plausible_web/live/components/form.ex
+++ b/lib/plausible_web/live/components/form.ex
@@ -59,7 +59,7 @@ defmodule PlausibleWeb.Live.Components.Form do
~H"""
<.label :if={@label != nil and @label != ""} for={@id}>
- <%= @label %>
+ {@label}
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
<.error :for={msg <- @errors}>
- <%= msg %>
+ {msg}
"""
@@ -88,7 +88,7 @@ defmodule PlausibleWeb.Live.Components.Form do
<.label for={@id}>
- <%= @label %>
+ {@label}
@@ -190,7 +190,7 @@ defmodule PlausibleWeb.Live.Components.Form do
assigns = assign(assigns, :class, final_class)
~H"""
-
Min <%= @minimum %> characters
+
Min {@minimum} characters
"""
end
@@ -249,7 +249,7 @@ defmodule PlausibleWeb.Live.Components.Form do
Password is too weak
- <%= @feedback %>
+ {@feedback}
"""
end
@@ -263,7 +263,7 @@ defmodule PlausibleWeb.Live.Components.Form do
def label(assigns) do
~H"""
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
@@ -276,7 +276,7 @@ defmodule PlausibleWeb.Live.Components.Form do
def error(assigns) do
~H"""
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
diff --git a/lib/plausible_web/live/components/modal.ex b/lib/plausible_web/live/components/modal.ex
index e7d76d65fd57..e3ea25730cbb 100644
--- a/lib/plausible_web/live/components/modal.ex
+++ b/lib/plausible_web/live/components/modal.ex
@@ -218,7 +218,7 @@ defmodule PlausibleWeb.Live.Components.Modal do
x-transition:leave-end="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
x-on:click.outside="closeModal()"
>
- <%= render_slot(@inner_block, modal_unique_id(@modal_sequence_id)) %>
+ {render_slot(@inner_block, modal_unique_id(@modal_sequence_id))}
diff --git a/lib/plausible_web/live/components/pagination.ex b/lib/plausible_web/live/components/pagination.ex
index 1ac65efe42b4..966b7b54118c 100644
--- a/lib/plausible_web/live/components/pagination.ex
+++ b/lib/plausible_web/live/components/pagination.ex
@@ -12,7 +12,7 @@ defmodule PlausibleWeb.Live.Components.Pagination do
>
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
diff --git a/lib/plausible_web/live/components/verification.ex b/lib/plausible_web/live/components/verification.ex
index 07a79e022b29..102532446c01 100644
--- a/lib/plausible_web/live/components/verification.ex
+++ b/lib/plausible_web/live/components/verification.ex
@@ -56,7 +56,7 @@ defmodule PlausibleWeb.Live.Components.Verification do
Verifying your integration
- <%= List.first(@interpretation.errors) %>
+ {List.first(@interpretation.errors)}
@@ -65,14 +65,14 @@ defmodule PlausibleWeb.Live.Components.Verification do
Your integration is working. Awaiting your first pageview.
-
<%= @message %>
+
{@message}
- <%= List.first(@interpretation.recommendations).text %>.
+ {List.first(@interpretation.recommendations).text}.
<.styled_link href={List.first(@interpretation.recommendations).url} new_tab={true}>
Learn more
diff --git a/lib/plausible_web/live/csv_export.ex b/lib/plausible_web/live/csv_export.ex
index 2682cdf768fa..ac6bafab3edc 100644
--- a/lib/plausible_web/live/csv_export.ex
+++ b/lib/plausible_web/live/csv_export.ex
@@ -173,7 +173,7 @@ defmodule PlausibleWeb.Live.CSVExport do
- <%= @export.name %>
+ {@export.name}
Note that this file will expire
<.hint message={@export.expires_at}>
- <%= Timex.Format.DateTime.Formatters.Relative.format!(@export.expires_at, "{relative}") %>.
+ {Timex.Format.DateTime.Formatters.Relative.format!(@export.expires_at, "{relative}")}.
Located at
- <.hint message={@export.path}><%= format_path(@export.path) %>
- (<%= format_bytes(@export.size) %>)
+ <.hint message={@export.path}>{format_path(@export.path)}
+ ({format_bytes(@export.size)})
"""
end
@@ -202,7 +202,7 @@ defmodule PlausibleWeb.Live.CSVExport do
defp hint(assigns) do
~H"""
- <%= render_slot(@inner_block) %>
+ {render_slot(@inner_block)}
"""
end
diff --git a/lib/plausible_web/live/csv_import.ex b/lib/plausible_web/live/csv_import.ex
index bfc617ae9cbe..40535a08e2bb 100644
--- a/lib/plausible_web/live/csv_import.ex
+++ b/lib/plausible_web/live/csv_import.ex
@@ -89,7 +89,7 @@ defmodule PlausibleWeb.Live.CSVImport do
original={@original_date_range}
/>
- <%= error_to_string(error) %>
+ {error_to_string(error)}
@@ -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 a5cbfcd2cdd2..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
@@ -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}
@@ -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)}
- Add Plugin Token for <%= @domain %>
+ Add Plugin Token for {@domain}
<.input
diff --git a/lib/plausible_web/live/props_settings.ex b/lib/plausible_web/live/props_settings.ex
index b850d656be9c..80e6a9103a85 100644
--- a/lib/plausible_web/live/props_settings.ex
+++ b/lib/plausible_web/live/props_settings.ex
@@ -40,7 +40,7 @@ defmodule PlausibleWeb.Live.PropsSettings do
<.flash_messages flash={@flash} />
<%= if @add_prop? do %>
- <%= live_render(
+ {live_render(
@socket,
PlausibleWeb.Live.PropsSettings.Form,
id: "props-form",
@@ -50,7 +50,7 @@ defmodule PlausibleWeb.Live.PropsSettings do
"site_id" => @site_id,
"rendered_by" => self()
}
- ) %>
+ )}
<% end %>
<.live_component
diff --git a/lib/plausible_web/live/props_settings/form.ex b/lib/plausible_web/live/props_settings/form.ex
index b0f750b8b42a..0bd4027b5109 100644
--- a/lib/plausible_web/live/props_settings/form.ex
+++ b/lib/plausible_web/live/props_settings/form.ex
@@ -47,7 +47,7 @@ defmodule PlausibleWeb.Live.PropsSettings.Form do
phx-submit="allow-prop"
phx-click-away="cancel-allow-prop"
>
- Add Property for <%= @domain %>
+ Add Property for {@domain}
<.label for="prop_input">
@@ -83,9 +83,9 @@ defmodule PlausibleWeb.Live.PropsSettings.Form do
/>
<.error :for={{msg, opts} <- f[:allowed_event_props].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)}
@@ -101,7 +101,7 @@ defmodule PlausibleWeb.Live.PropsSettings.Form do
class="mt-2 text-sm hover:underline text-indigo-600 dark:text-indigo-400 text-left"
phx-click="allow-existing-props"
>
- Already sending custom properties? Click to add <%= @prop_key_options_count %> existing properties we found.
+ Already sending custom properties? Click to add {@prop_key_options_count} existing properties we found.
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
- <%= prop %>
+ {prop}
- <%= Plausible.product_name() %>
+ {Plausible.product_name()}
Lightweight and privacy-friendly web analytics
@@ -50,11 +50,11 @@ defmodule PlausibleWeb.Live.RegisterForm do
Invitation expired
- Your invitation has expired or been revoked. Please request fresh one or you can <%= link(
+ Your invitation has expired or been revoked. Please request fresh one or you can {link(
"sign up",
class: "text-indigo-600 hover:text-indigo-900",
to: Routes.auth_path(@socket, :register)
- ) %> for a 30-day unlimited free trial without an invitation.
+ )} for a 30-day unlimited free trial without an invitation.
"""
@@ -65,7 +65,7 @@ defmodule PlausibleWeb.Live.RegisterForm do
<%= if ce?() or @live_action == :register_from_invitation_form do %>
- Register your <%= Plausible.product_name() %> account
+ Register your {Plausible.product_name()} account
<% else %>
Register your 30-day free trial
<% end %>
@@ -145,7 +145,7 @@ defmodule PlausibleWeb.Live.RegisterForm do
<%= if @captcha_error do %>
- <%= @captcha_error %>
+ {@captcha_error}
<% end %>
<% else %>
- <%= render("_footer.html", assigns) %>
+ {render("_footer.html", assigns)}
<% end %>
diff --git a/lib/plausible_web/templates/layout/base_error.html.heex b/lib/plausible_web/templates/layout/base_error.html.heex
index bf3e20d93ea5..ab0449538485 100644
--- a/lib/plausible_web/templates/layout/base_error.html.heex
+++ b/lib/plausible_web/templates/layout/base_error.html.heex
@@ -11,7 +11,7 @@
- <%= img_tag(
+ {img_tag(
PlausibleWeb.Router.Helpers.static_path(
@conn,
logo_path("logo_dark.svg")
@@ -19,8 +19,8 @@
class: "w-44 hidden dark:inline",
alt: "Plausible logo",
loading: "lazy"
- ) %>
- <%= img_tag(
+ )}
+ {img_tag(
PlausibleWeb.Router.Helpers.static_path(
@conn,
logo_path("logo_light.svg")
@@ -28,11 +28,11 @@
class: "w-44 inline dark:hidden",
alt: "Plausible logo",
loading: "lazy"
- ) %>
+ )}
- <%= @inner_content %>
+ {@inner_content}
diff --git a/lib/plausible_web/templates/layout/focus.html.heex b/lib/plausible_web/templates/layout/focus.html.heex
index 744647dec5aa..7920300cc065 100644
--- a/lib/plausible_web/templates/layout/focus.html.heex
+++ b/lib/plausible_web/templates/layout/focus.html.heex
@@ -14,14 +14,14 @@
<% end %>
- <%= assigns[:title] || "Plausible · Web analytics" %>
+ {assigns[:title] || "Plausible · Web analytics"}
- <%= render("_tracking.html", assigns) %>
+ {render("_tracking.html", assigns)}
- <%= img_tag(
+ {img_tag(
PlausibleWeb.Router.Helpers.static_path(
@conn,
logo_path("logo_dark.svg")
@@ -29,8 +29,8 @@
class: "w-44 hidden dark:inline",
alt: "Plausible logo",
loading: "lazy"
- ) %>
- <%= img_tag(
+ )}
+ {img_tag(
PlausibleWeb.Router.Helpers.static_path(
@conn,
logo_path("logo_light.svg")
@@ -38,18 +38,18 @@
class: "w-44 inline dark:hidden",
alt: "Plausible logo",
loading: "lazy"
- ) %>
+ )}
<%= if assigns[:flash] do %>
- <%= render("_flash.html", assigns) %>
+ {render("_flash.html", assigns)}
<% end %>
- <%= @inner_content %>
+ {@inner_content}
<%= if ee?() do %>
- © <%= DateTime.utc_now().year %> Plausible Analytics. All rights reserved.
+ © {DateTime.utc_now().year} Plausible Analytics. All rights reserved.
<% end %>
diff --git a/lib/plausible_web/templates/layout/site_settings.html.heex b/lib/plausible_web/templates/layout/site_settings.html.heex
index 6c1768267d5c..088576c79999 100644
--- a/lib/plausible_web/templates/layout/site_settings.html.heex
+++ b/lib/plausible_web/templates/layout/site_settings.html.heex
@@ -1,19 +1,19 @@
<%= render_layout "app.html", assigns do %>
- <%= link("← Back to Stats",
+ {link("← Back to Stats",
to: "/#{URI.encode_www_form(@site.domain)}",
class: "text-sm text-indigo-600 font-bold"
- ) %>
+ )}
- Settings for <%= @site.domain %>
+ Settings for {@site.domain}
<%= form_for @conn, "/sites/#{URI.encode_www_form(@site.domain)}/monthly-report/recipients", [class: "lg:hidden"], fn f -> %>
<% options = flat_settings_options(@conn) %>
- <%= select(f, :tab, options,
+ {select(f, :tab, options,
class:
"dark:bg-gray-800 mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 dark:border-gray-500 outline-none focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md dark:text-gray-100",
onchange:
@@ -21,38 +21,38 @@
URI.encode_www_form(@site.domain) <> "/settings/' + event.target.value",
selected:
Enum.find_value(options, &(is_current_tab(@conn, elem(&1, 1)) && elem(&1, 1)))
- ) %>
+ )}
<% end %>
<%= for %{key: key, value: value, icon: icon} <- settings_tabs(@conn) do %>
<%= if is_binary(value) do %>
- <%= render("_settings_tab.html",
+ {render("_settings_tab.html",
icon: icon,
this_tab: value,
text: key,
site: @site,
conn: @conn,
submenu?: false
- ) %>
+ )}
<% else %>
- <%= render("_settings_tab.html",
+ {render("_settings_tab.html",
icon: icon,
this_tab: nil,
text: key,
site: @site,
conn: @conn,
submenu?: false
- ) %>
+ )}
<%= for %{key: key, value: val} <- value do %>
- <%= render("_settings_tab.html",
+ {render("_settings_tab.html",
icon: nil,
this_tab: val,
text: key,
site: @site,
conn: @conn,
submenu?: true
- ) %>
+ )}
<% end %>
<% end %>
@@ -61,7 +61,7 @@
- <%= @inner_content %>
+ {@inner_content}
diff --git a/lib/plausible_web/templates/site/change_domain.html.heex b/lib/plausible_web/templates/site/change_domain.html.heex
index c5afb0503703..7119735b5d4b 100644
--- a/lib/plausible_web/templates/site/change_domain.html.heex
+++ b/lib/plausible_web/templates/site/change_domain.html.heex
@@ -3,7 +3,7 @@
Change your website domain
- <%= label(f, :domain, class: "block text-sm font-medium text-gray-700 dark:text-gray-300") %>
+ {label(f, :domain, class: "block text-sm font-medium text-gray-700 dark:text-gray-300")}
Just the naked domain or subdomain without 'www'
@@ -11,13 +11,13 @@
https://
- <%= text_input(f, :domain,
+ {text_input(f, :domain,
class:
"focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-800 flex-1 block w-full px-3 py-2 rounded-none rounded-r-md sm:text-sm border-gray-300 dark:border-gray-500 dark:bg-gray-900 dark:text-gray-300",
placeholder: "example.com"
- ) %>
+ )}
- <%= error_tag(f, :domain) %>
+ {error_tag(f, :domain)}
diff --git a/lib/plausible_web/templates/site/csv_import.html.heex b/lib/plausible_web/templates/site/csv_import.html.heex
index f551dc325247..a7a5920bf7f4 100644
--- a/lib/plausible_web/templates/site/csv_import.html.heex
+++ b/lib/plausible_web/templates/site/csv_import.html.heex
@@ -14,11 +14,11 @@
- <%= live_render(@conn, PlausibleWeb.Live.CSVImport,
+ {live_render(@conn, PlausibleWeb.Live.CSVImport,
session: %{
"site_id" => @site.id,
"current_user_id" => @current_user.id,
"storage" => on_ee(do: "s3", else: "local")
}
- ) %>
+ )}
diff --git a/lib/plausible_web/templates/site/membership/invite_member_form.html.heex b/lib/plausible_web/templates/site/membership/invite_member_form.html.heex
index 6191f5ac9968..4a9c3efa2d83 100644
--- a/lib/plausible_web/templates/site/membership/invite_member_form.html.heex
+++ b/lib/plausible_web/templates/site/membership/invite_member_form.html.heex
@@ -1,5 +1,5 @@
<%= form_for @conn, Routes.membership_path(@conn, :invite_member, @site.domain), [class: "max-w-lg w-full mx-auto bg-white dark:bg-gray-800 shadow-md rounded px-8 pt-6 pb-8 mb-4 mt-8"], fn f -> %>
- Invite member to <%= @site.domain %>
+ Invite member to {@site.domain}
- Enter the email address and role of the person you want to invite. We will contact them over email to offer them access to <%= @site.domain %> analytics.
+ Enter the email address and role of the person you want to invite. We will contact them over email to offer them access to {@site.domain} analytics.
@@ -18,9 +18,9 @@
- <%= label(f, :email, "Email address",
+ {label(f, :email, "Email address",
class: "block text-sm font-medium text-gray-700 dark:text-gray-300"
- ) %>
+ )}
- <%= email_input(f, :email,
+ {email_input(f, :email,
class:
"focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-900 dark:text-gray-300 block w-full rounded-md pl-10 sm:text-sm border-gray-300 dark:border-gray-500",
placeholder: "john.doe@example.com",
required: "true"
- ) %>
+ )}
- <%= error_tag(f, :email) %>
+ {error_tag(f, :email)}
<%= if @conn.assigns[:error] do %>
-
<%= @conn.assigns[:error] %>
+
{@conn.assigns[:error]}
<% end %>
- <%= label(f, :role, class: "block text-sm font-medium text-gray-700 dark:text-gray-300") %>
+ {label(f, :role, class: "block text-sm font-medium text-gray-700 dark:text-gray-300")}
- <%= radio_button(f, :role, "admin",
+ {radio_button(f, :role, "admin",
class:
"dark:bg-gray-900 h-4 w-4 mt-0.5 cursor-pointer text-indigo-600 border-gray-300 dark:border-gray-500 focus:ring-indigo-500",
"x-model": "selectedOption",
required: "true"
- ) %>
+ )}
- <%= radio_button(f, :role, "viewer",
+ {radio_button(f, :role, "viewer",
class:
"dark:bg-gray-900 h-4 w-4 mt-0.5 cursor-pointer text-indigo-600 border-gray-300 dark:border-gray-500 focus:ring-indigo-500",
"x-model": "selectedOption",
required: "true"
- ) %>
+ )}
- <%= label(f, :domain, class: "block text-sm font-medium text-gray-700 dark:text-gray-300") %>
+ {label(f, :domain, class: "block text-sm font-medium text-gray-700 dark:text-gray-300")}
Just the naked domain or subdomain without 'www'
@@ -48,31 +48,31 @@
https://
- <%= text_input(f, :domain,
+ {text_input(f, :domain,
class:
"focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-800 flex-1 block w-full px-3 py-2 rounded-none rounded-r-md sm:text-sm border-gray-300 dark:border-gray-500 dark:bg-gray-900 dark:text-gray-300",
placeholder: "example.com",
disabled: @site_limit_exceeded?
- ) %>
+ )}
- <%= error_tag(f, :domain) %>
+ {error_tag(f, :domain)}
- <%= label(f, :timezone, "Reporting Timezone",
+ {label(f, :timezone, "Reporting Timezone",
class: "block text-sm font-medium text-gray-700 dark:text-gray-300"
- ) %>
+ )}
To make sure we agree on what 'today' means
- <%= select(f, :timezone, Plausible.Timezones.options(),
+ {select(f, :timezone, Plausible.Timezones.options(),
id: "tz-select",
selected: "Etc/Greenwich",
class:
"mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 dark:border-gray-500 dark:bg-gray-900 dark:text-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md",
disabled: @site_limit_exceeded?
- ) %>
+ )}
- <%= submit("Add snippet →",
+ {submit("Add snippet →",
class: "button mt-4 w-full disabled:cursor-not-allowed",
disabled: @site_limit_exceeded?
- ) %>
+ )}
<% end %>
<%= if @first_site? do %>
- <%= render(PlausibleWeb.AuthView, "_onboarding_steps.html", current_step: 2) %>
+ {render(PlausibleWeb.AuthView, "_onboarding_steps.html", current_step: 2)}
<% end %>
diff --git a/lib/plausible_web/templates/site/settings_email_reports.html.heex b/lib/plausible_web/templates/site/settings_email_reports.html.heex
index de23058e0425..be77d3683baf 100644
--- a/lib/plausible_web/templates/site/settings_email_reports.html.heex
+++ b/lib/plausible_web/templates/site/settings_email_reports.html.heex
@@ -38,7 +38,7 @@
- <%= recipient %>
+ {recipient}
<%= button(to: "/sites/#{URI.encode_www_form(@site.domain)}/weekly-report/recipients/#{recipient}", method: :delete) do %>
- <%= email_input(f, :recipient,
+ {email_input(f, :recipient,
class:
"focus:ring-indigo-500 dark:bg-gray-900 focus:border-indigo-500 block w-full rounded-none rounded-l-md pl-10 sm:text-sm border-gray-300 dark:border-gray-500 dark:placeholder-gray-400 dark:text-gray-100",
placeholder: "recipient@example.com",
required: "true"
- ) %>
+ )}
<%= submit class: "-ml-px relative button rounded-l-none" do %>
@@ -131,7 +131,7 @@
- <%= recipient %>
+ {recipient}
<%= button(to: "/sites/#{URI.encode_www_form(@site.domain)}/monthly-report/recipients/#{recipient}", method: :delete) do %>
- <%= email_input(f, :recipient,
+ {email_input(f, :recipient,
class:
"focus:ring-indigo-500 dark:bg-gray-900 focus:border-indigo-500 block w-full rounded-none rounded-l-md pl-10 sm:text-sm border-gray-300 dark:border-gray-500 dark:placeholder-gray-400 dark:text-gray-100",
placeholder: "recipient@example.com",
required: "true"
- ) %>
+ )}
<%= submit class: "-ml-px relative button rounded-l-none" do %>
@@ -240,10 +240,10 @@
- <%= number_input(f, :threshold,
+ {number_input(f, :threshold,
class:
"focus:ring-indigo-500 dark:bg-gray-900 focus:border-indigo-500 block w-full rounded-none rounded-l-md pl-10 sm:text-sm border-gray-300 dark:border-gray-500 dark:text-gray-100"
- ) %>
+ )}
Save threshold
@@ -264,7 +264,7 @@
- <%= recipient %>
+ {recipient}
<%= button(to: "/sites/#{URI.encode_www_form(@site.domain)}/spike-notification/recipients/#{recipient}", method: :delete) do %>
- <%= email_input(f, :recipient,
+ {email_input(f, :recipient,
class:
"focus:ring-indigo-500 dark:bg-gray-900 focus:border-indigo-500 block w-full rounded-none rounded-l-md pl-10 sm:text-sm border-gray-300 dark:border-gray-500 dark:placeholder-gray-400 dark:text-gray-100",
placeholder: "recipient@example.com",
required: "true"
- ) %>
+ )}
<%= submit class: "-ml-px relative button rounded-l-none" do %>
diff --git a/lib/plausible_web/templates/site/settings_funnels.html.heex b/lib/plausible_web/templates/site/settings_funnels.html.heex
index c66f222a4ec9..12af409aabaf 100644
--- a/lib/plausible_web/templates/site/settings_funnels.html.heex
+++ b/lib/plausible_web/templates/site/settings_funnels.html.heex
@@ -20,9 +20,9 @@
site={@site}
conn={@conn}
>
- <%= live_render(@conn, PlausibleWeb.Live.FunnelSettings,
+ {live_render(@conn, PlausibleWeb.Live.FunnelSettings,
session: %{"site_id" => @site.id, "domain" => @site.domain}
- ) %>
+ )}
diff --git a/lib/plausible_web/templates/site/settings_general.html.heex b/lib/plausible_web/templates/site/settings_general.html.heex
index 36745ff1a78c..80d57e287316 100644
--- a/lib/plausible_web/templates/site/settings_general.html.heex
+++ b/lib/plausible_web/templates/site/settings_general.html.heex
@@ -10,15 +10,15 @@
- <%= label(nil, "Domain",
+ {label(nil, "Domain",
class: "block text-sm font-medium leading-5 text-gray-700 dark:text-gray-300"
- ) %>
- <%= text_input(nil, :domain,
+ )}
+ {text_input(nil, :domain,
value: @site.domain,
disabled: "disabled",
class:
"dark:bg-gray-900 w-full mt-1 block pl-3 pr-10 py-2 text-base border-gray-300 dark:border-gray-500 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md dark:text-gray-100 text-gray-500"
- ) %>
+ )}
@@ -46,13 +46,13 @@
- <%= label(f, :timezone, "Reporting Timezone",
+ {label(f, :timezone, "Reporting Timezone",
class: "block text-sm font-medium leading-5 text-gray-700 dark:text-gray-300"
- ) %>
- <%= select(f, :timezone, Plausible.Timezones.options(),
+ )}
+ {select(f, :timezone, Plausible.Timezones.options(),
class:
"dark:bg-gray-900 mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 dark:border-gray-500 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md dark:text-gray-100 cursor-pointer"
- ) %>
+ )}
@@ -77,13 +77,13 @@
- <%= textarea(f, :domain,
+ {textarea(f, :domain,
id: "snippet_code",
class:
"transition overflow-hidden bg-gray-100 dark:bg-gray-900 outline-none appearance-none border border-transparent rounded w-full p-2 pr-6 text-gray-700 dark:text-gray-300 leading-normal focus:outline-none focus:bg-white focus:border-gray-300 dark:focus:border-gray-500 text-xs mt-2 resize-none",
value: render_snippet(@site, ["live-view"]),
rows: 2
- ) %>
+ )}
- <%= live_render(@conn, PlausibleWeb.Live.Verification,
+ {live_render(@conn, PlausibleWeb.Live.Verification,
session: %{
"site_id" => @site.id,
"domain" => @site.domain,
"modal?" => true,
"slowdown" => @conn.private[:verification_slowdown]
}
- ) %>
+ )}
<% end %>
diff --git a/lib/plausible_web/templates/site/settings_goals.html.heex b/lib/plausible_web/templates/site/settings_goals.html.heex
index 8ea638a51659..17701046bec4 100644
--- a/lib/plausible_web/templates/site/settings_goals.html.heex
+++ b/lib/plausible_web/templates/site/settings_goals.html.heex
@@ -19,8 +19,8 @@
site={@site}
conn={@conn}
>
- <%= live_render(@conn, PlausibleWeb.Live.GoalSettings,
+ {live_render(@conn, PlausibleWeb.Live.GoalSettings,
session: %{"site_id" => @site.id, "domain" => @site.domain}
- ) %>
+ )}
diff --git a/lib/plausible_web/templates/site/settings_imports_exports.html.heex b/lib/plausible_web/templates/site/settings_imports_exports.html.heex
index e7120f2dea8c..3ebc231c56bd 100644
--- a/lib/plausible_web/templates/site/settings_imports_exports.html.heex
+++ b/lib/plausible_web/templates/site/settings_imports_exports.html.heex
@@ -11,9 +11,9 @@
- <%= live_render(@conn, PlausibleWeb.Live.ImportsExportsSettings,
+ {live_render(@conn, PlausibleWeb.Live.ImportsExportsSettings,
session: %{"domain" => @site.domain}
- ) %>
+ )}
@@ -26,11 +26,11 @@
- <%= live_render(@conn, PlausibleWeb.Live.CSVExport,
+ {live_render(@conn, PlausibleWeb.Live.CSVExport,
session: %{
"site_id" => @site.id,
"email_to" => @current_user.email,
"storage" => on_ee(do: "s3", else: "local")
}
- ) %>
+ )}
diff --git a/lib/plausible_web/templates/site/settings_integrations.html.heex b/lib/plausible_web/templates/site/settings_integrations.html.heex
index f41ad50c8403..252b60da3058 100644
--- a/lib/plausible_web/templates/site/settings_integrations.html.heex
+++ b/lib/plausible_web/templates/site/settings_integrations.html.heex
@@ -17,12 +17,12 @@
- <%= live_render(@conn, PlausibleWeb.Live.Plugins.API.Settings,
+ {live_render(@conn, PlausibleWeb.Live.Plugins.API.Settings,
session: %{
"site_id" => @site.id,
"domain" => @site.domain,
"new_token" => @conn.query_params["new_token"]
}
- ) %>
+ )}
diff --git a/lib/plausible_web/templates/site/settings_people.html.heex b/lib/plausible_web/templates/site/settings_people.html.heex
index 1835915731cb..1229534eb050 100644
--- a/lib/plausible_web/templates/site/settings_people.html.heex
+++ b/lib/plausible_web/templates/site/settings_people.html.heex
@@ -13,13 +13,13 @@
- <%= img_tag(Plausible.Auth.User.profile_img_url(membership.user),
+ {img_tag(Plausible.Auth.User.profile_img_url(membership.user),
class: "h-8 w-8 rounded-full"
- ) %>
+ )}
- <%= membership.user.name %>
+ {membership.user.name}
- <%= membership.user.email %>
+ {membership.user.email}
@@ -38,7 +38,7 @@
@click="open = !open"
class="inline-flex items-center shadow-sm px-2.5 py-0.5 border border-gray-300 dark:border-gray-500 text-sm leading-5 font-medium rounded-full bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-800"
>
- <%= membership.role |> Atom.to_string() |> String.capitalize() %>
+ {membership.role |> Atom.to_string() |> String.capitalize()}
- <%= link("Transfer ownership →",
+ {link("Transfer ownership →",
to: Routes.membership_path(@conn, :transfer_ownership_form, @site.domain),
class: "inline-block w-full p-4 text-sm text-red-600 font-medium"
- ) %>
+ )}
<% end %>
<% else %>
@@ -203,13 +203,13 @@
<%= for invitation <- @site.invitations do %>
- <%= invitation.email %>
+ {invitation.email}
- <%= invitation.role |> Atom.to_string() |> String.capitalize() %>
+ {invitation.role |> Atom.to_string() |> String.capitalize()}
- <%= link("Remove",
+ {link("Remove",
to:
Routes.invitation_path(
@conn,
@@ -219,7 +219,7 @@
),
method: :delete,
class: "text-red-600 hover:text-red-900"
- ) %>
+ )}
<% end %>
diff --git a/lib/plausible_web/templates/site/settings_props.html.heex b/lib/plausible_web/templates/site/settings_props.html.heex
index 044dbb5e2a39..f276492633a0 100644
--- a/lib/plausible_web/templates/site/settings_props.html.heex
+++ b/lib/plausible_web/templates/site/settings_props.html.heex
@@ -31,10 +31,10 @@
site={@site}
conn={@conn}
>
- <%= live_render(@conn, PlausibleWeb.Live.PropsSettings,
+ {live_render(@conn, PlausibleWeb.Live.PropsSettings,
id: "props-form",
session: %{"site_id" => @site.id, "domain" => @site.domain}
- ) %>
+ )}
diff --git a/lib/plausible_web/templates/site/settings_search_console.html.heex b/lib/plausible_web/templates/site/settings_search_console.html.heex
index 3a38219f6120..901288b85058 100644
--- a/lib/plausible_web/templates/site/settings_search_console.html.heex
+++ b/lib/plausible_web/templates/site/settings_search_console.html.heex
@@ -14,22 +14,22 @@
<%= if @site.google_auth do %>
- Linked Google account: <%= @site.google_auth.email %>
+ Linked Google account: {@site.google_auth.email}
- <%= link("Unlink Google account",
+ {link("Unlink Google account",
to: "/#{URI.encode_www_form(@site.domain)}/settings/google-search",
class:
"inline-block px-4 text-sm leading-5 font-medium text-red-600 bg-white dark:bg-gray-800 hover:text-red-500 dark:hover:text-red-400 focus:outline-none focus:ring active:text-red-800 active:bg-gray-50 transition ease-in-out duration-150",
method: "delete"
- ) %>
+ )}
<%= case @search_console_domains do %>
<% {:ok, domains} -> %>
<%= if @site.google_auth.property && !(@site.google_auth.property in domains) do %>
- NB: Your Google account does not have access to your currently configured property, <%= @site.google_auth.property %>. Please select a verified property from the list below.
+ NB: Your Google account does not have access to your currently configured property, {@site.google_auth.property}. Please select a verified property from the list below.
<% else %>
@@ -47,15 +47,15 @@
<%= form_for Plausible.Site.GoogleAuth.changeset(@site.google_auth), "/#{URI.encode_www_form(@site.domain)}/settings/google", [class: "max-w-xs"], fn f -> %>
- <%= select(f, :property, domains,
+ {select(f, :property, domains,
prompt: "(Choose property)",
class:
"dark:bg-gray-800 mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 dark:border-gray-500 outline-none focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md dark:text-gray-100"
- ) %>
+ )}
- <%= submit("Save", class: "button") %>
+ {submit("Save", class: "button")}
<% end %>
<% {:error, error} -> %>
@@ -116,11 +116,11 @@
- An extra step is needed to set up your <%= Plausible.product_name() %> for the Google Search Console integration.
- Find instructions <%= link("here",
+ An extra step is needed to set up your {Plausible.product_name()} for the Google Search Console integration.
+ Find instructions {link("here",
to: "https://plausible.io/docs/self-hosting-configuration#google-search-integration",
class: "text-indigo-500"
- ) %>
+ )}
<% end %>
diff --git a/lib/plausible_web/templates/site/settings_shields.html.heex b/lib/plausible_web/templates/site/settings_shields.html.heex
index a96814822bd4..a38f41ec2201 100644
--- a/lib/plausible_web/templates/site/settings_shields.html.heex
+++ b/lib/plausible_web/templates/site/settings_shields.html.heex
@@ -1,31 +1,31 @@
<%= case @shield do %>
<% "ip_addresses" -> %>
- <%= live_render(@conn, PlausibleWeb.Live.Shields.IPAddresses,
+ {live_render(@conn, PlausibleWeb.Live.Shields.IPAddresses,
session: %{
"site_id" => @site.id,
"domain" => @site.domain,
"remote_ip" => PlausibleWeb.RemoteIP.get(@conn)
}
- ) %>
+ )}
<% "countries" -> %>
- <%= live_render(@conn, PlausibleWeb.Live.Shields.Countries,
+ {live_render(@conn, PlausibleWeb.Live.Shields.Countries,
session: %{
"site_id" => @site.id,
"domain" => @site.domain
}
- ) %>
+ )}
<% "pages" -> %>
- <%= live_render(@conn, PlausibleWeb.Live.Shields.Pages,
+ {live_render(@conn, PlausibleWeb.Live.Shields.Pages,
session: %{
"site_id" => @site.id,
"domain" => @site.domain
}
- ) %>
+ )}
<% "hostnames" -> %>
- <%= live_render(@conn, PlausibleWeb.Live.Shields.Hostnames,
+ {live_render(@conn, PlausibleWeb.Live.Shields.Hostnames,
session: %{
"site_id" => @site.id,
"domain" => @site.domain
}
- ) %>
+ )}
<% end %>
diff --git a/lib/plausible_web/templates/site/settings_visibility.html.heex b/lib/plausible_web/templates/site/settings_visibility.html.heex
index 2ae8796e69c5..d93006131d61 100644
--- a/lib/plausible_web/templates/site/settings_visibility.html.heex
+++ b/lib/plausible_web/templates/site/settings_visibility.html.heex
@@ -17,10 +17,10 @@
<% end %>
- Stats are publicly available on <%= link(PlausibleWeb.StatsView.pretty_stats_url(@site),
+ Stats are publicly available on {link(PlausibleWeb.StatsView.pretty_stats_url(@site),
to: Routes.stats_path(@conn, :stats, @site.domain, []),
class: "text-indigo-500"
- ) %>
+ )}
<% else %>
@@ -30,10 +30,10 @@
<% end %>
- Make stats publicly available on <%= link(PlausibleWeb.StatsView.pretty_stats_url(@site),
+ Make stats publicly available on {link(PlausibleWeb.StatsView.pretty_stats_url(@site),
to: Routes.stats_path(@conn, :stats, @site.domain, []),
class: "text-indigo-500"
- ) %>
+ )}
<% end %>
@@ -56,7 +56,7 @@
for={link.slug}
class="flex content-center text-sm font-medium text-gray-700 dark:text-gray-300"
>
- <%= link.name %>
+ {link.name}
<%= if link.password_hash do %>
- <%= textarea(f, :domain,
+ {textarea(f, :domain,
id: "snippet_code",
class:
"transition overflow-hidden bg-gray-100 dark:bg-gray-900 appearance-none border border-transparent rounded w-full p-2 pr-6 text-gray-700 dark:text-gray-300 leading-normal appearance-none focus:outline-none focus:bg-white dark:focus:bg-gray-800 focus:border-gray-400 dark:focus:border-gray-500 text-xs mt-4 resize-none",
value: render_snippet(@site, ["live-view"]),
rows: 3,
readonly: "readonly"
- ) %>
+ )}
- <%= link(button_label,
+ {link(button_label,
class: "button mt-4 w-full",
to: "/#{URI.encode_www_form(@site.domain)}"
- ) %>
+ )}
<% end %>
<%= if @is_first_site do %>
- <%= render(PlausibleWeb.AuthView, "_onboarding_steps.html", current_step: 3) %>
+ {render(PlausibleWeb.AuthView, "_onboarding_steps.html", current_step: 3)}
<% end %>
diff --git a/lib/plausible_web/templates/stats/site_locked.html.heex b/lib/plausible_web/templates/stats/site_locked.html.heex
index fc61042447fc..6deee54484a1 100644
--- a/lib/plausible_web/templates/stats/site_locked.html.heex
+++ b/lib/plausible_web/templates/stats/site_locked.html.heex
@@ -44,14 +44,14 @@
This dashboard is currently locked and cannot be accessed. The site owner
- <%= @site.owner.email %>
+ {@site.owner.email}
must upgrade their subscription plan in order to
unlock the stats.
Want to pay for this site with the account you're logged in with?
- Contact <%= @site.owner.email %> and ask them to
+ Contact {@site.owner.email} and ask them to
<.styled_link href="https://plausible.io/docs/transfer-ownership" new_tab={true}>
transfer the ownership
diff --git a/lib/plausible_web/templates/stats/waiting_first_pageview.html.heex b/lib/plausible_web/templates/stats/waiting_first_pageview.html.heex
index 78b0a14fc0bf..eaf04e264a38 100644
--- a/lib/plausible_web/templates/stats/waiting_first_pageview.html.heex
+++ b/lib/plausible_web/templates/stats/waiting_first_pageview.html.heex
@@ -26,7 +26,7 @@
class="bg-white dark:bg-gray-800 shadow-md rounded px-8 pt-6 pb-8 mb-4 mt-16 relative text-center"
>
Waiting for first pageview
-
on <%= @site.domain %>
+
on {@site.domain}
- <%= if Plausible.Verification.enabled?(assigns[:current_user]),
+ {if Plausible.Verification.enabled?(assigns[:current_user]),
do:
live_render(@conn, PlausibleWeb.Live.Verification,
session: %{
@@ -69,5 +69,5 @@
"domain" => @site.domain,
"slowdown" => @conn.private[:verification_slowdown]
}
- ) %>
+ )}