nx: base layout

pull/653/head
Varun Patil 2023-05-03 00:37:25 -07:00
parent 3c1d6cffdd
commit 9903885862
2 changed files with 14 additions and 1 deletions

View File

@ -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;
}

View File

@ -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