-
- Invitation for {@site.domain}
-
-
-
- You've been invited to the {@site.domain} analytics dashboard as {@invitation.invitation.role}.
-
-
+
+
+ You're invited to {@site.domain}
+
+
+
+ You've been added as {@invitation.invitation.role}
+ to the {@site.domain} analytics dashboard.
+ <%= if !(Map.get(@invitation, :exceeded_limits) || Map.get(@invitation, :no_plan)) &&
+ @invitation.invitation.role == :owner do %>
If you accept the ownership transfer, you will be responsible for billing going forward.
-
-
+ <% else %>
+ Welcome aboard!
+ <% end %>
+
<.notice
@@ -730,30 +723,30 @@ defmodule PlausibleWeb.Live.Sites do
You are unable to accept the ownership of this site because your account does not have a subscription. To become the owner of this site, you should upgrade to a suitable plan.
+
<.button
:if={!(Map.get(@invitation, :exceeded_limits) || Map.get(@invitation, :no_plan))}
mt?={false}
- class="sm:ml-3 w-full sm:w-auto sm:text-sm"
+ class="w-full sm:w-auto sm:text-sm"
data-method="post"
data-csrf={Plug.CSRFProtection.get_csrf_token()}
data-to={"/sites/invitations/#{@invitation.invitation.invitation_id}/accept"}
data-autofocus
>
- Accept & Continue
+ Accept and continue
<.button_link
:if={Map.get(@invitation, :exceeded_limits) || Map.get(@invitation, :no_plan)}
mt?={false}
href={Routes.billing_path(PlausibleWeb.Endpoint, :choose_plan)}
- class="sm:ml-3 w-full sm:w-auto sm:text-sm"
+ class="w-full sm:w-auto sm:text-sm"
data-autofocus
>
Upgrade
<.button_link
mt?={false}
- class="w-full sm:w-auto mr-2 sm:text-sm mt-2 sm:mt-0"
+ class="w-full sm:w-auto sm:text-sm"
href="#"
theme="secondary"
data-method="post"
diff --git a/lib/plausible_web/templates/layout/_header.html.heex b/lib/plausible_web/templates/layout/_header.html.heex
index d3a7dd3aac66..9d0feb35c5c9 100644
--- a/lib/plausible_web/templates/layout/_header.html.heex
+++ b/lib/plausible_web/templates/layout/_header.html.heex
@@ -47,12 +47,19 @@
:if={ee?() and Plausible.Teams.on_trial?(@conn.assigns[:current_team])}
class="hidden sm:block"
>
- <.styled_link
- class="flex items-center h-[40px] px-3 py-2 text-sm text-yellow-700 hover:text-yellow-800 dark:text-yellow-500 dark:hover:text-yellow-500 font-medium rounded-md bg-yellow-100 dark:bg-yellow-800/40 dark:hover:bg-yellow-800/50 transition-colors duration-150"
- href={Routes.settings_path(@conn, :subscription)}
- >
- {trial_notification(@conn.assigns[:current_team])}
-
+
+
+ {trial_notification(@conn.assigns[:current_team])}
+
+ <.button_link
+ href={Routes.settings_path(@conn, :subscription)}
+ theme="yellow"
+ mt?={false}
+ class="!px-3 !py-2"
+ >
+ Upgrade
+
+
<.dropdown>
diff --git a/test/plausible_web/components/billing/billing_test.exs b/test/plausible_web/components/billing/billing_test.exs
index ab1d1b1e3e07..fff310ebb949 100644
--- a/test/plausible_web/components/billing/billing_test.exs
+++ b/test/plausible_web/components/billing/billing_test.exs
@@ -17,10 +17,9 @@ defmodule PlausibleWeb.Components.BillingTest do
}
|> render_feature_gate()
- assert class_of_element(html, "#feature-gate-inner-block-container") =~
- "pointer-events-none"
-
- assert class_of_element(html, "#feature-gate-overlay") =~ "backdrop-blur"
+ assert element_exists?(html, "#feature-gate-inner-block-container")
+ assert element_exists?(html, "#feature-gate-overlay")
+ assert text_of_element(html, "#feature-gate-overlay") =~ "Upgrade to unlock"
end
test "renders a blur overlay for a teamless account" do
@@ -32,10 +31,9 @@ defmodule PlausibleWeb.Components.BillingTest do
}
|> render_feature_gate()
- assert class_of_element(html, "#feature-gate-inner-block-container") =~
- "pointer-events-none"
-
- assert class_of_element(html, "#feature-gate-overlay") =~ "backdrop-blur"
+ assert element_exists?(html, "#feature-gate-inner-block-container")
+ assert element_exists?(html, "#feature-gate-overlay")
+ assert text_of_element(html, "#feature-gate-overlay") =~ "Upgrade to unlock"
end
test "does not render a blur overlay if feature access is granted", %{user: user} do
@@ -47,9 +45,7 @@ defmodule PlausibleWeb.Components.BillingTest do
}
|> render_feature_gate()
- refute class_of_element(html, "#feature-gate-inner-block-container") =~
- "pointer-events-none"
-
+ assert element_exists?(html, "#feature-gate-inner-block-container")
refute element_exists?(html, "#feature-gate-overlay")
end
@@ -89,7 +85,7 @@ defmodule PlausibleWeb.Components.BillingTest do
}
|> render_feature_gate()
- assert text_of_element(html, "#lock-notice") =~ "reach out to the team owner"
+ assert text_of_element(html, "#lock-notice") =~ "ask your team owner"
end
end
diff --git a/test/plausible_web/components/billing/notice_test.exs b/test/plausible_web/components/billing/notice_test.exs
index f0836c8e9498..cdf9dc63bae2 100644
--- a/test/plausible_web/components/billing/notice_test.exs
+++ b/test/plausible_web/components/billing/notice_test.exs
@@ -50,7 +50,7 @@ defmodule PlausibleWeb.Components.Billing.NoticeTest do
)
assert rendered =~ "This team is limited to 10 users"
- assert rendered =~ "please reach out to the team owner to upgrade their subscription"
+ assert rendered =~ "ask your team owner to upgrade their subscription"
end
@tag :ee_only
diff --git a/test/plausible_web/live/funnel_settings_test.exs b/test/plausible_web/live/funnel_settings_test.exs
index 5ca0cd99767e..f3142b0618e1 100644
--- a/test/plausible_web/live/funnel_settings_test.exs
+++ b/test/plausible_web/live/funnel_settings_test.exs
@@ -21,7 +21,7 @@ defmodule PlausibleWeb.Live.FunnelSettingsTest do
conn = get(conn, "/#{site.domain}/settings/funnels")
resp = conn |> html_response(200)
- assert text(resp) =~ "please upgrade your subscription"
+ assert text(resp) =~ "upgrade your subscription"
end
test "lists funnels for the site and renders help link", %{conn: conn, site: site} do
@@ -33,7 +33,7 @@ defmodule PlausibleWeb.Live.FunnelSettingsTest do
assert resp =~ "From blog to signup"
assert resp =~ "From signup to blog"
refute resp =~ "Your account does not have access"
- refute resp =~ "please upgrade your subscription"
+ refute resp =~ "upgrade your subscription"
assert element_exists?(resp, "a[href=\"https://plausible.io/docs/funnel-analysis\"]")
end
diff --git a/test/plausible_web/live/props_settings_test.exs b/test/plausible_web/live/props_settings_test.exs
index 18b990b9476c..dd1e5df04def 100644
--- a/test/plausible_web/live/props_settings_test.exs
+++ b/test/plausible_web/live/props_settings_test.exs
@@ -21,7 +21,7 @@ defmodule PlausibleWeb.Live.PropsSettingsTest do
|> html_response(200)
|> text_of_element("#lock-notice")
- assert lock_notice =~ "please upgrade your subscription"
+ assert lock_notice =~ "upgrade your subscription"
end
@tag :ee_only
@@ -38,7 +38,7 @@ defmodule PlausibleWeb.Live.PropsSettingsTest do
|> html_response(200)
|> text_of_element("#lock-notice")
- refute lock_notice =~ "please upgrade your subscription"
+ refute lock_notice =~ "upgrade your subscription"
end
test "lists props for the site and renders links", %{conn: conn, site: site} do
@@ -56,7 +56,7 @@ defmodule PlausibleWeb.Live.PropsSettingsTest do
assert resp =~ "amount"
assert resp =~ "logged_in"
assert resp =~ "is_customer"
- refute resp =~ "please upgrade your subscription"
+ refute resp =~ "upgrade your subscription"
end
test "lists props with disallow actions", %{conn: conn, site: site} do
@@ -133,7 +133,7 @@ defmodule PlausibleWeb.Live.PropsSettingsTest do
assert resp =~ "amount"
assert resp =~ "logged_in"
assert resp =~ "is_customer"
- refute resp =~ "please upgrade your subscription"
+ refute resp =~ "upgrade your subscription"
end
test "if no props are allowed, a proper info is displayed", %{
diff --git a/test/plausible_web/live/team_setup_test.exs b/test/plausible_web/live/team_setup_test.exs
index 82118ace4eac..f599ef33da28 100644
--- a/test/plausible_web/live/team_setup_test.exs
+++ b/test/plausible_web/live/team_setup_test.exs
@@ -93,10 +93,9 @@ defmodule PlausibleWeb.Live.TeamSetupTest do
{:ok, _lv, html} = live(conn, @url)
- assert class_of_element(html, "#feature-gate-inner-block-container") =~
- "pointer-events-none"
-
- assert class_of_element(html, "#feature-gate-overlay") =~ "backdrop-blur-[6px]"
+ assert element_exists?(html, "#feature-gate-inner-block-container")
+ assert element_exists?(html, "#feature-gate-overlay")
+ assert text_of_element(html, "#feature-gate-overlay") =~ "Upgrade to unlock"
end
end