refactor: 🏗️ move script and style to template
This commit is contained in:
parent
df3d6e824d
commit
4e4edf40f0
@ -12,7 +12,6 @@ use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
|||||||
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
||||||
use OCP\AppFramework\Http\TemplateResponse;
|
use OCP\AppFramework\Http\TemplateResponse;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
use OCP\Util;
|
|
||||||
|
|
||||||
class PageController extends Controller
|
class PageController extends Controller
|
||||||
{
|
{
|
||||||
@ -26,9 +25,6 @@ class PageController extends Controller
|
|||||||
#[NoCSRFRequired]
|
#[NoCSRFRequired]
|
||||||
#[FrontpageRoute(verb: 'GET', url: '/')]
|
#[FrontpageRoute(verb: 'GET', url: '/')]
|
||||||
public function index(): TemplateResponse {
|
public function index(): TemplateResponse {
|
||||||
Util::addScript(Application::APP_ID, Application::APP_ID.'-main');
|
|
||||||
Util::addStyle(Application::APP_ID, Application::APP_ID.'-main');
|
|
||||||
|
|
||||||
$csp = new ContentSecurityPolicy();
|
$csp = new ContentSecurityPolicy();
|
||||||
$csp->addAllowedImageDomain('*');
|
$csp->addAllowedImageDomain('*');
|
||||||
$csp->addAllowedMediaDomain('*');
|
$csp->addAllowedMediaDomain('*');
|
||||||
|
@ -1 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use OCA\RePod\AppInfo\Application;
|
||||||
|
use OCP\Util;
|
||||||
|
|
||||||
|
Util::addScript(Application::APP_ID, Application::APP_ID . '-main');
|
||||||
|
Util::addStyle(Application::APP_ID, Application::APP_ID . '-main');
|
||||||
|
|
||||||
|
?>
|
||||||
<div id="content"></div>
|
<div id="content"></div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user