page: do not hide bg

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/672/head
Varun Patil 2023-05-20 21:53:05 -07:00
parent 68ef973bab
commit 2f0fb83f7c
4 changed files with 15 additions and 3 deletions

View File

@ -57,7 +57,7 @@ class PageController extends Controller
OCPUtil::addTranslations('recognize');
}
$response = new TemplateResponse($this->appName, 'main');
$response = new TemplateResponse($this->appName, 'main', self::getMainParams());
$response->setContentSecurityPolicy(self::getCSP());
$response->cacheFor(0);
@ -110,6 +110,16 @@ class PageController extends Controller
return $policy;
}
/**
* Get params for main.php template.
*/
public static function getMainParams()
{
return [
'native' => Util::callerIsNative(),
];
}
/**
* @NoAdminRequired
*

View File

@ -86,7 +86,7 @@ class PublicAlbumController extends Controller
// Scripts
Util::addScript($this->appName, 'memories-main');
$response = new PublicTemplateResponse($this->appName, 'main');
$response = new PublicTemplateResponse($this->appName, 'main', PageController::getMainParams());
$response->setHeaderTitle($album['name']);
$response->setFooterVisible(false); // wth is that anyway?
$response->setContentSecurityPolicy(PageController::getCSP());

View File

@ -127,7 +127,7 @@ class PublicController extends AuthPublicShareController
Util::addOgMetadata($node, $node->getName(), $url, $params);
// Render the template
$response = new PublicTemplateResponse($this->appName, 'main');
$response = new PublicTemplateResponse($this->appName, 'main', PageController::getMainParams());
$response->setHeaderTitle($node->getName());
$response->setFooterVisible(false); // wth is that anyway?
$response->setContentSecurityPolicy(PageController::getCSP());

View File

@ -1,7 +1,9 @@
<? if ($native === true) { ?>
<style type="text/css">
body, html {
background: transparent;
}
</style>
<? } ?>
<div id="vue-content"></div>