refactor: 🏗️ move script and style to template
Some checks failed
repod / nodejs (push) Waiting to run
repod / release (push) Waiting to run
repod / xml (push) Successful in 12s
repod / php (push) Has been cancelled

This commit is contained in:
Michel Roux 2025-01-21 10:49:49 +01:00
parent df3d6e824d
commit 4e4edf40f0
2 changed files with 9 additions and 4 deletions

View File

@ -12,7 +12,6 @@ use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IRequest;
use OCP\Util;
class PageController extends Controller
{
@ -26,9 +25,6 @@ class PageController extends Controller
#[NoCSRFRequired]
#[FrontpageRoute(verb: 'GET', url: '/')]
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->addAllowedImageDomain('*');
$csp->addAllowedMediaDomain('*');

View File

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