From 4e4edf40f0dc0dd086334043280a47ab01a90a07 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Tue, 21 Jan 2025 10:49:49 +0100 Subject: [PATCH] refactor: :building_construction: move script and style to template --- lib/Controller/PageController.php | 4 ---- templates/main.php | 9 +++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index b8e2705..88db662 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -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('*'); diff --git a/templates/main.php b/templates/main.php index 33cfaeb..c4b6099 100644 --- a/templates/main.php +++ b/templates/main.php @@ -1 +1,10 @@ +