diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 066aba6e..58884216 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -55,7 +55,6 @@ class PageController extends Controller // Scripts OCPUtil::addScript($this->appName, 'memories-main'); - $this->eventDispatcher->dispatchTyped(new LoadSidebar()); // Extra translations if (Util::recognizeIsEnabled()) { @@ -67,6 +66,14 @@ class PageController extends Controller $response->setContentSecurityPolicy(self::getCSP()); $response->cacheFor(0); + // Check if requested from native app + $userAgent = $this->request->getHeader('User-Agent'); + if (strpos($userAgent, 'memories-native') !== false) { + $response->renderAs(TemplateResponse::RENDER_AS_BASE); + } else { + $this->eventDispatcher->dispatchTyped(new LoadSidebar()); + } + return $response; } diff --git a/src/global.scss b/src/global.scss index 38c4f31e..783ec0da 100644 --- a/src/global.scss +++ b/src/global.scss @@ -25,6 +25,12 @@ body { border-top-left-radius: var(--body-container-radius); border-bottom-left-radius: var(--body-container-radius); } + + // Nothing on top + body.layout-base & { + margin-top: 0 !important; + height: 100vh !important; + } } // Top bar is above everything else on mobile