Make import date range look non-clickable

Because they aren't
pull/1364/head
Uku Taht 5 years ago
parent 83c407c016
commit 826e900c1b

@ -706,14 +706,15 @@ defmodule PlausibleWeb.SiteController do
Plausible.Stats.Clickhouse.pageview_start_date_local(site) || Timex.today(site.timezone)
{:ok, view_ids} = Plausible.Google.Api.get_analytics_view_ids(access_token)
{view_id_name, _} = Enum.find(view_ids, fn {k, v} -> v == view_id end)
conn
|> assign(:skip_plausible_tracking, true)
|> render("import_from_google_confirm.html",
access_token: access_token,
site: site,
view_ids: view_ids,
selected_view_id: view_id,
selected_view_id_name: view_id_name,
start_date: start_date,
end_date: end_date,
layout: {PlausibleWeb.LayoutView, "focus.html"}

@ -1,11 +1,11 @@
Hey <%= user_salutation(@user) %>,
<br /><br />
<%= if @success do %>
Your Google Analytics import has completed.
<br /><br />
View dashboard: @link
Your Google Analytics import has completed successfully. The Plausible dashboard for <%= @site.domain %> now contains historical imported data from <%= date_format(@site.imported_data.start_date) %> to <%= date_format(@site.imported_data.end_date) %>
<br /><br />
<%= link("Click here", to: @link) %> to view your dashboard.
<% else %>
Unfortunately, your Google Analytics import failed.
Unfortunately, your Google Analytics import for <%= @site.domain %> did not complete successfully. Please try again <%= if !Application.get_env(:plausible, :is_selfhost) do %>or <%= link("contact support", to: "https://plausible.io/contact") %><% end %>.
<% end %>
<br /><br />
--

@ -7,27 +7,24 @@
<% {:ok, start_date} -> %>
<div class="mt-6 text-sm text-gray-500 dark:text-gray-200">
Confirm the view and dates in your Google Analytics account to be imported to the Plausible dashboard
Stats from this property and time period will be imported from your Google Analytics account to your Plausible dashboard
</div>
<div class="mt-3">
<div class="mt-6">
<%= styled_label(f, :view_id, "Google Analytics view") %>
<%= styled_select f, :view_display, @view_ids, disabled: "true", selected: @selected_view_id %>
<span class="block w-full text-base dark:text-gray-100 sm:text-sm dark:bg-gray-800"><%= @selected_view_id_name %></span>
<%= hidden_input f, :view_id, readonly: "true", value: @selected_view_id %>
</div>
<div class="mt-6 text-sm text-gray-500 dark:text-gray-200">
Historical data will be imported from your first Google Analytics visitor to your first Plausible visitor
</div>
<div class="flex justify-between mt-3">
<div class="w-36">
<%= styled_label f, :start_date, "From" %>
<%= styled_text_input f, :start_date, value: PlausibleWeb.EmailView.date_format(start_date), readonly: "true" %>
<span class="block w-full text-base dark:text-gray-100 sm:text-sm dark:bg-gray-800"><%= PlausibleWeb.EmailView.date_format(start_date) %></span>
<%= hidden_input f, :start_date, value: start_date, readonly: "true" %>
</div>
<div class="align-middle pt-8">&rarr;</div>
<div class="align-middle pt-4 dark:text-gray-100">&rarr;</div>
<div class="w-36">
<%= styled_label f, :end_date, "To" %>
<%= styled_text_input f, :end_date, value: PlausibleWeb.EmailView.date_format(@end_date), readonly: "true" %>
<span class="block w-full text-base dark:text-gray-100 sm:text-sm dark:bg-gray-800"><%= PlausibleWeb.EmailView.date_format(@end_date) %></span>
<%= hidden_input f, :end_date, value: @end_date, readonly: "true" %>
</div>
</div>

@ -10,7 +10,7 @@ defmodule PlausibleWeb.FormHelpers do
"mt-1 block w-full px-3 py-2 text-base dark:text-gray-100 dark:border-gray-500 border-gray-300 focus:outline-none sm:text-sm rounded-md"
]
@active_text_input_class "dark:bg-gray-900 focus:ring-indigo-500 focus:border-indigo-500"
@disabled_text_input_class "bg-gray-100 dark:bg-gray-800 select-none"
@disabled_text_input_class "bg-gray-100 dark:bg-gray-800 select-none cursor-default"
def styled_text_input(form, field, opts \\ []) do
opts = merge_opts(@text_input_opts, opts)

Loading…
Cancel
Save