@@ -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]
}
- ) %>
+ )}
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