From 1579fd8bc64fb9cdd271532608caf0db645de16b Mon Sep 17 00:00:00 2001 From: Uku Taht Date: Fri, 20 Nov 2020 10:19:28 +0200 Subject: [PATCH] Separate public dashboard and shared links --- .../site/settings_visibility.html.eex | 50 +++++++++++-------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/lib/plausible_web/templates/site/settings_visibility.html.eex b/lib/plausible_web/templates/site/settings_visibility.html.eex index d2c3ccbbb..b72c689c1 100644 --- a/lib/plausible_web/templates/site/settings_visibility.html.eex +++ b/lib/plausible_web/templates/site/settings_visibility.html.eex @@ -1,8 +1,11 @@
-
-

Dashboard visibility

+
+

Public dashboard

Share your stats publicly or keep them private

-
+ <%= link(to: "https://docs.plausible.io/visibility", target: "_blank") do %> + + <% end %> + <%= if @site.public do %> <% end %> +
-
-
-

Shared links

-

You can share your stats privately by generating a shared link. The links are impossible to guess and you can add password protection for extra security.

-
+
+
+

Shared links

+

You can share your stats privately by generating a shared link. The links are impossible to guess and you can add password protection for extra security.

+ <%= link(to: "https://docs.plausible.io/shared-links", target: "_blank") do %> + + <% end %> +
-
- <%= for link <- @shared_links do %> -
- - - <%= button(to: "/sites/#{URI.encode_www_form(@site.domain)}/shared-links/#{link.slug}", method: :delete, class: "py-2 px-4 bg-gray-100 text-red-600 rounded-l-none", data: [confirm: "Are you sure you want to delete this shared link? The stats will not be accessible with this link anymore."]) do %> - - <% end %> -
- <% end %> +
+ <%= for link <- @shared_links do %> +
+ + + <%= button(to: "/sites/#{URI.encode_www_form(@site.domain)}/shared-links/#{link.slug}", method: :delete, class: "py-2 px-4 bg-gray-100 text-red-600 rounded-l-none", data: [confirm: "Are you sure you want to delete this shared link? The stats will not be accessible with this link anymore."]) do %> + + <% end %> +
+ <% end %> - <%= link("+ New link", to: "/sites/#{URI.encode_www_form(@site.domain)}/shared-links/new", class: "button mt-4") %> -
+ <%= link("+ New link", to: "/sites/#{URI.encode_www_form(@site.domain)}/shared-links/new", class: "button mt-4") %>