Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Fix private preview notice typo (#3503)
Vini Brasilb5000cc2473b
diff --git a/lib/plausible_web/components/billing.ex b/lib/plausible_web/components/billing.exindex cdb3db5726..33823e4942 100644--- a/lib/plausible_web/components/billing.ex+++ b/lib/plausible_web/components/billing.ex@@ -4,6 +4,7 @@ defmodule PlausibleWeb.Components.Billing douse Phoenix.Componentimport PlausibleWeb.Components.Genericrequire Plausible.Billing.Subscription.Status+ alias Plausible.Billing.Feature.{Props, StatsAPI}alias PlausibleWeb.Router.Helpers, as: Routesalias Plausible.Billing.{Subscription, Plans, Subscriptions}@@ -20,10 +21,17 @@ defmodule PlausibleWeb.Components.Billing doplan = Plans.get_regular_plan(billable_user.subscription, only_non_expired: true)business? = plan && plan.kind == :business+ legacy_feature_access? =+ Timex.before?(assigns.billable_user.inserted_at, Plans.business_tier_launch()) &&+ assigns.feature_mod in [StatsAPI, Props]+private_preview? = FunWithFlags.enabled?(:premium_features_private_preview)has_access? = assigns.feature_mod.check_availability(assigns.billable_user) == :okcond do+ legacy_feature_access? ->+ ~H""+Plausible.Billing.on_trial?(assigns.billable_user) ->~H"""<.notice class="rounded-t-md rounded-b-none" size={@size} {@rest}>@@ -53,7 +61,7 @@ defmodule PlausibleWeb.Components.Billing doenddefp private_preview_days_remaining do- private_preview_ends_at = Timex.shift(Plausible.Billing.Plans.business_tier_launch(), days: 7)+ private_preview_ends_at = Timex.shift(Plausible.Billing.Plans.business_tier_launch(), days: 8)days_remaining = Timex.diff(private_preview_ends_at, NaiveDateTime.utc_now(), :day)@@ -103,7 +111,7 @@ defmodule PlausibleWeb.Components.Billing doif assigns.current_user.id == assigns.billable_user.id do~H"""please- <.link class="underline" href={Routes.billing_path(PlausibleWeb.Endpoint, :upgrade)}>+ <.link class="underline" href={Plausible.Billing.upgrade_route_for(@current_user)}>upgrade your subscription</.link>"""diff --git a/lib/plausible_web/live/register_form.ex b/lib/plausible_web/live/register_form.exindex b6fdaa3722..143ca30ded 100644--- a/lib/plausible_web/live/register_form.ex+++ b/lib/plausible_web/live/register_form.ex@@ -71,7 +71,7 @@ defmodule PlausibleWeb.Live.RegisterForm do<%= if @is_selfhost or @live_action == :register_from_invitation_form do %>Register your Plausible Analytics account<% else %>- Register your 30-day unlimited-use free trial+ Register your 30-day free trial<% end %></h1><div class="text-xl font-medium">Set up privacy-friendly analytics with just a few clicks</div>diff --git a/lib/plausible_web/templates/billing/change_enterprise_plan_contact_us.html.eex b/lib/plausible_web/templates/billing/change_enterprise_plan_contact_us.html.eexindex 67a85d883d..8e0c369853 100644--- a/lib/plausible_web/templates/billing/change_enterprise_plan_contact_us.html.eex+++ b/lib/plausible_web/templates/billing/change_enterprise_plan_contact_us.html.eex@@ -5,11 +5,11 @@<div class="w-full max-w-lg px-4 mx-auto mt-4"><div class="flex-1 p-8 mt-8 bg-white rounded shadow-md dark:bg-gray-800"><div class="w-full pb-4 dark:text-gray-100">- <span>Need to change your limits?</span>+ <span>Looking to adjust your plan?</span></div><ul class="w-full py-4 dark:text-gray-100">- <span>Your account is on an enterprise plan. If you want to increase or decrease the limits on your account, please contact us at [email protected]</span>+ <span>You're currently on a custom plan. To modify your limits or unlock additional features, please contact us at [email protected]. We're here to help tailor your plan to your needs.</span></ul></div>diff --git a/test/plausible_web/components/billing_test.exs b/test/plausible_web/components/billing_test.exsindex 3525c1bd2e..9880c64cc0 100644--- a/test/plausible_web/components/billing_test.exs+++ b/test/plausible_web/components/billing_test.exs@@ -26,7 +26,7 @@ defmodule PlausibleWeb.Components.BillingTest doassert rendered =~ "This account does not have access to Custom Properties"assert rendered =~ "upgrade your subscription"- assert rendered =~ "/billing/upgrade"+ assert rendered =~ "/billing/choose-plan"endtest "premium_feature_notice/1 does not render an upgrade link when user is not the site owner" do@@ -70,7 +70,7 @@ defmodule PlausibleWeb.Components.BillingTest doassert rendered =~ "This account is limited to 10 users. To increase this limit"assert rendered =~ "upgrade your subscription"- assert rendered =~ "/billing/upgrade"+ assert rendered =~ "/billing/choose-plan"endtest "limit_exceeded_notice/1 when billable user is on growth but is not current user does not display upgrade link" do@@ -101,7 +101,7 @@ defmodule PlausibleWeb.Components.BillingTest doassert rendered =~ "This account is limited to 10 users"assert rendered =~ "upgrade your subscription"- assert rendered =~ "/billing/upgrade"+ assert rendered =~ "/billing/choose-plan"endtest "limit_exceeded_notice/1 when billable user is on an enterprise plan displays support email" dodiff --git a/test/plausible_web/controllers/billing_controller_test.exs b/test/plausible_web/controllers/billing_controller_test.exsindex 41171be2d0..fb398053da 100644--- a/test/plausible_web/controllers/billing_controller_test.exs+++ b/test/plausible_web/controllers/billing_controller_test.exs@@ -222,8 +222,6 @@ defmodule PlausibleWeb.BillingControllerTest doendend- @enterprise_contact_link "[email protected]"-describe "GET /upgrade-to-enterprise-plan (already subscribed to latest enterprise plan)" dosetup [:create_user, :log_in, :configure_enterprise_plan]@@ -237,9 +235,9 @@ defmodule PlausibleWeb.BillingControllerTest do|> get(Routes.billing_path(conn, :upgrade_to_enterprise_plan))|> html_response(200)- assert doc =~ "Need to change your limits?"- assert doc =~ "Your account is on an enterprise plan"- assert doc =~ "contact us at #{@enterprise_contact_link}"+ assert doc =~ "Looking to adjust your plan?"+ assert doc =~ "You're currently on a custom plan."+ assert doc =~ "please contact us at [email protected]"endend