Stop relying on app env

pull/3559/head
Adam Rutkowski 3 years ago
parent b381a4c637
commit 667fe1d2bb

@ -363,14 +363,11 @@ defmodule PlausibleWeb.StatsController do
end
defp is_dbip() do
is_or_nil =
if Application.get_env(:plausible, :is_selfhost) do
if type = Plausible.Geo.database_type() do
String.starts_with?(type, "DBIP")
end
end
!!is_or_nil
on_full_build do
true
else
String.starts_with?(Plausible.Geo.database_type(), "DBIP")
end
end
defp title(%{path_info: ["plausible.io"]}, _) do

@ -27,10 +27,10 @@
<ol class="list-disc text-xs text-gray-500 leading-tight space-y-1 mt-1">
<li>Check your spam folder</li>
<li><%= link("Send a new code", class: "underline text-indigo-600", to: "/activate/request-code", method: :post) %> to <%= @conn.assigns[:current_user].email %></li>
<%= if Application.get_env(:plausible, :is_selfhost) do %>
<li>Ask on our <%= link("community-supported forum", to: "https://github.com/plausible/analytics/discussions", class: "text-indigo-600 underline" ) %></li>
<% else %>
<%= if full_build?() do %>
<li><a class="underline text-indigo-600" href="https://plausible.io/contact">Contact us</a> if the problem persists</li>
<% else %>
<li>Ask on our <%= link("community-supported forum", to: "https://github.com/plausible/analytics/discussions", class: "text-indigo-600 underline" ) %></li>
<% end %>
</ol>
<div class="mt-4 text-sm dark:text-gray-100">

@ -27,7 +27,7 @@
If all of the above is fine, please try to do the import once again. Sometimes the Google Analytics API just randomly returns empty data. It's intermittent and random. Trying to do the import again may return what you need.
<%= if !Application.get_env(:plausible, :is_selfhost) do %>
<%= if full_build?() do %>
<br /> <br />
Please reply to this email to let us know if you're still experiencing issues with the import.
<% end %>

@ -1,4 +1,5 @@
defmodule PlausibleWeb.EmailView do
use Plausible
use PlausibleWeb, :view
def plausible_url do

Loading…
Cancel
Save