From 8bf0fb515f218ab9c40c470b9c5a7b0cdd288321 Mon Sep 17 00:00:00 2001 From: Guy Van Sanden Date: Thu, 16 Apr 2026 16:03:37 +0200 Subject: [PATCH] v1.0.18 - PHP loads CSS and JS via event --- appinfo/info.xml | 2 +- lib/AppInfo/Application.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 8ddcd81..3f5e80d 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -4,7 +4,7 @@ Minimal Profile Hides profile fields to create a minimal user profile Allows administrators to hide profile fields like pronouns, social links, etc. - 1.0.17 + 1.0.18 AGPL Your Name MinimalProfile diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 7c7d987..e569d45 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -8,6 +8,8 @@ use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; +use OCP\AppFramework\Http\TemplateResponse; +use OCP\Util; class Application extends App implements IBootstrap { @@ -18,6 +20,13 @@ class Application extends App implements IBootstrap { } public function register(IRegistrationContext $context): void { + $context->registerEventListener( + TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS, + function() { + Util::addStyle('minimalprofile', 'minimalprofile'); + Util::addScript('minimalprofile', 'minimalprofile'); + } + ); } public function boot(IBootContext $context): void {