Embedded dashboard fixes (#2744)

* Add padding to embedded dashboards

* Changelog entry

* Do not check origin in iframe-resizer
pull/2757/head
Uku Taht 4 years ago committed by GitHub
parent 05d14774be
commit 8c8cf23bf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -25,6 +25,7 @@ All notable changes to this project will be documented in this file.
- Always show direct traffic in sources reports plausible/analytics#2531
- Stop recording XX and T1 country codes plausible/analytics#2556
- Device type is now determined from the User-Agent instead of window.innerWidth plausible/analytics#2711
- Add padding by default to embedded dashboards so that shadows are not cut off plausible/analytics#2744
### Removed
- Remove Firewall plug and `IP_BLOCKLIST` environment variable

@ -2,7 +2,8 @@ import iframeResize from 'iframe-resizer/js/iframeResizer'
var iframes = iframeResize({
heightCalculationMethod: 'taggedElement',
onInit: onInit
onInit: onInit,
checkOrigin: false
}, '[plausible-embed]')
function onInit() {

@ -52,7 +52,7 @@ defmodule PlausibleWeb.StatsView do
def stats_container_class(conn) do
cond do
conn.assigns[:embedded] && conn.assigns[:width] == "manual" -> ""
conn.assigns[:embedded] -> "max-w-screen-lg mx-auto"
conn.assigns[:embedded] -> "max-w-screen-xl mx-auto px-6"
!conn.assigns[:embedded] -> "container"
end
end

Loading…
Cancel
Save