From ff17233536ae5ff2a7796a06818ff6f6bc71aee6 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 22 May 2023 17:10:14 +0200 Subject: [PATCH] fix(public-embed): Fix header showing on embed view Regression from https://github.com/nextcloud/calendar/pull/5184 Signed-off-by: Thomas Citharel --- css/public.scss | 17 +++++++++++------ lib/Controller/PublicViewController.php | 2 ++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/css/public.scss b/css/public.scss index 047743114..75e2b0706 100644 --- a/css/public.scss +++ b/css/public.scss @@ -70,13 +70,18 @@ } } -#body-public .app-calendar-public { - & + footer { - // Only show bottom rounded corners - border-radius: 0 0 var(--border-radius-large) var(--border-radius-large); +#body-public { + input#initial-state-calendar-is_embed ~ header#header { + display: none; } + .app-calendar-public { + & + footer { + // Only show bottom rounded corners + border-radius: 0 0 var(--border-radius-large) var(--border-radius-large); + } - .app-content { - height: calc(100% - 65px) !important; // $footer-height is hardcoded to 65px in core/css/public.scss + .app-content { + height: calc(100% - 65px) !important; // $footer-height is hardcoded to 65px in core/css/public.scss + } } } diff --git a/lib/Controller/PublicViewController.php b/lib/Controller/PublicViewController.php index bbd0b719c..3f1e93bec 100644 --- a/lib/Controller/PublicViewController.php +++ b/lib/Controller/PublicViewController.php @@ -104,6 +104,8 @@ class PublicViewController extends Controller { $csp->addAllowedFrameAncestorDomain('*'); $response->setContentSecurityPolicy($csp); + $this->initialStateService->provideInitialState($this->appName, 'is_embed', true); + return $response; }