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 tabs in mobile view
Uku Tahtcb8424b441bb
diff --git a/lib/plausible_web/templates/layout/site_settings.html.eex b/lib/plausible_web/templates/layout/site_settings.html.eexindex 67d66898e0..f7d9779dd9 100644--- a/lib/plausible_web/templates/layout/site_settings.html.eex+++ b/lib/plausible_web/templates/layout/site_settings.html.eex@@ -6,35 +6,19 @@Settings for <%= @site.domain %></h2></div>- <div class="lg:grid lg:grid-cols-12 lg:gap-x-5 mt-6">- <div class="py-6 px-2 sm:px-6 lg:py-0 lg:px-0 lg:col-span-3">- <div class="lg:hidden">- <select class="mt-1 form-select block w-full pl-3 pr-10 py-2 text-base leading-6 border-gray-300 focus:outline-none focus:ring focus:border-blue-300 sm:text-sm sm:leading-5 transition ease-in-out duration-150">- <option selected>General</option>-- <option>Password</option>-- <option>Notifications</option>-- <option>Plan</option>-- <option>Billing</option>-- <option>Team Members</option>- </select>- </div>+ <div class="lg:grid lg:grid-cols-12 lg:gap-x-5 lg:mt-4">+ <div class="py-6 g:py-0 lg:col-span-3">+ <%= form_for @conn, "/sites/#{URI.encode_www_form(@site.domain)}/monthly-report/recipients", [class: "lg:hidden"], fn f -> %>+ <%= select f, :tab, settings_tabs(), class: "mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md", onchange: "location.href = location.href.replace(/[^\/\/]*$/, event.target.value)", selected: List.last(@conn.path_info) %>+ <% end %><div class="hidden lg:block">- <%= render("_settings_tab.html", this_tab: "general", text: "General", site: @site, conn: @conn) %>- <%= render("_settings_tab.html", this_tab: "visibility", text: "Visibility", site: @site, conn: @conn) %>- <%= render("_settings_tab.html", this_tab: "goals", text: "Goals", site: @site, conn: @conn) %>- <%= render("_settings_tab.html", this_tab: "search-console", text: "Search Console", site: @site, conn: @conn) %>- <%= render("_settings_tab.html", this_tab: "email-reports", text: "Email reports", site: @site, conn: @conn) %>- <%= render("_settings_tab.html", this_tab: "custom-domain", text: "Custom domain", site: @site, conn: @conn) %>- <%= render("_settings_tab.html", this_tab: "danger-zone", text: "Danger zone", site: @site, conn: @conn) %>+ <%= for [key: key, value: val] <- settings_tabs() do %>+ <%= render("_settings_tab.html", this_tab: val, text: key, site: @site, conn: @conn) %>+ <% end %></div></div>- <div class="space-y-6 sm:px-6 lg:px-0 lg:col-span-9">+ <div class="space-y-6 lg:col-span-9 lg:mt-4"><%= render @view_module, @view_template, assigns %></div></div>diff --git a/lib/plausible_web/views/layout_view.ex b/lib/plausible_web/views/layout_view.exindex e3b6f5f6ea..d8a776bbac 100644--- a/lib/plausible_web/views/layout_view.ex+++ b/lib/plausible_web/views/layout_view.ex@@ -21,6 +21,19 @@ defmodule PlausibleWeb.LayoutView doendend+ def settings_tabs() do+ [+ [key: "General", value: "general"],+ [key: "Visibility", value: "visibility"],+ [key: "Goals", value: "goals"],+ [key: "Search Console", value: "search-console"],+ [key: "Email reports", value: "email-reports"],+ [key: "Custom domain", value: "custom-domain"],+ [key: "Danger zone", value: "danger-zone"],+ ]+ end++def trial_notificaton(user) docase Plausible.Billing.trial_days_left(user) dodays when days > 1 ->