diff --git a/lib/plausible_web/controllers/stats_controller.ex b/lib/plausible_web/controllers/stats_controller.ex index 10058c50d..7641e20d3 100644 --- a/lib/plausible_web/controllers/stats_controller.ex +++ b/lib/plausible_web/controllers/stats_controller.ex @@ -162,22 +162,32 @@ defmodule PlausibleWeb.StatsController do end defp render_shared_link(conn, shared_link) do - conn - |> assign(:skip_plausible_tracking, true) - |> put_resp_header("x-robots-tag", "noindex") - |> delete_resp_header("x-frame-options") - |> render("stats.html", - site: shared_link.site, - has_goals: Plausible.Sites.has_goals?(shared_link.site), - title: "Plausible · " <> shared_link.site.domain, - offer_email_report: false, - demo: false, - skip_plausible_tracking: true, - shared_link_auth: shared_link.slug, - embedded: conn.params["embed"] == "true", - background: conn.params["background"], - theme: conn.params["theme"] - ) + cond do + !shared_link.site.locked -> + conn + |> assign(:skip_plausible_tracking, true) + |> put_resp_header("x-robots-tag", "noindex") + |> delete_resp_header("x-frame-options") + |> render("stats.html", + site: shared_link.site, + has_goals: Plausible.Sites.has_goals?(shared_link.site), + title: "Plausible · " <> shared_link.site.domain, + offer_email_report: false, + demo: false, + skip_plausible_tracking: true, + shared_link_auth: shared_link.slug, + embedded: conn.params["embed"] == "true", + background: conn.params["background"], + theme: conn.params["theme"] + ) + + shared_link.site.locked -> + owner = Plausible.Sites.owner_for(shared_link.site) + + conn + |> assign(:skip_plausible_tracking, true) + |> render("site_locked.html", owner: owner, site: shared_link.site) + end end defp remove_email_report_banner(conn, site) do diff --git a/lib/plausible_web/templates/stats/site_locked.html.eex b/lib/plausible_web/templates/stats/site_locked.html.eex index abb775276..bbe71587c 100644 --- a/lib/plausible_web/templates/stats/site_locked.html.eex +++ b/lib/plausible_web/templates/stats/site_locked.html.eex @@ -38,9 +38,11 @@ This site is currently locked and cannot be accessed. You can check back later or contact the site owner to unlock it.
-
- Need to see the snippet again? <%= link("Click here", to: "/#{URI.encode_www_form(@site.domain)}/snippet", class: "text-indigo-600 text-underline")%>
- Not working? <%= link("Troubleshoot the integration", to: "https://plausible.io/docs/troubleshoot-integration#keep-seeing-a-blinking-green-dot", class: "text-indigo-600 text-underline", rel: "noreferrer") %> with our guide
+ Need to see the snippet again? <%= link("Click here", to: "/#{URI.encode_www_form(@site.domain)}/snippet", class: "text-indigo-600 dark:text-indigo-500 text-underline")%>
+ Not working? <%= link("Troubleshoot the integration", to: "https://plausible.io/docs/troubleshoot-integration#keep-seeing-a-blinking-green-dot", class: "text-indigo-600 dark:text-indigo-500 text-underline", rel: "noreferrer") %> with our guide
<%= if Application.get_env(:plausible, :is_selfhost) do %>
- first
Still not working? Ask on our <%= link("community-supported forum", to: "https://github.com/plausible/analytics/discussions", class: "text-indigo-600 text-underline" ) %>
+ first
Still not working? Ask on our <%= link("community-supported forum", to: "https://github.com/plausible/analytics/discussions", class: "text-indigo-600 dark:text-indigo-500 text-underline" ) %>
<% else %>
- first
Still not working? <%= link("Contact us", to: "https://plausible.io/contact", class: "text-indigo-600 text-underline" ) %> and we will help you with your setup
+ first
Still not working? <%= link("Contact us", to: "https://plausible.io/contact", class: "text-indigo-600 dark:text-indigo-500 text-underline" ) %> and we will help you with your setup
<% end %>