parent
68ef973bab
commit
2f0fb83f7c
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<? if ($native === true) { ?>
|
||||
<style type="text/css">
|
||||
body, html {
|
||||
background: transparent;
|
||||
}
|
||||
</style>
|
||||
<? } ?>
|
||||
|
||||
<div id="vue-content"></div>
|
||||
|
|
Loading…
Reference in New Issue