From 9ab91e4d900fa02fae5dc2fc224867dc6c04b7d7 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 27 Feb 2026 02:38:17 +0000
Subject: [PATCH] Enable dark theme selection in component.php and offline.php
matching index.php approach
Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
---
src/templates/component.php | 18 ++++++++
src/templates/offline.php | 84 +++++++------------------------------
2 files changed, 33 insertions(+), 69 deletions(-)
diff --git a/src/templates/component.php b/src/templates/component.php
index 9eeb946..75098a0 100644
--- a/src/templates/component.php
+++ b/src/templates/component.php
@@ -193,6 +193,9 @@ if ($this->params->get('faKitCode')) {
$params_leftIcon = htmlspecialchars($this->params->get('drawerLeftIcon', 'fa-solid fa-chevron-left'), ENT_COMPAT, 'UTF-8');
$params_rightIcon = htmlspecialchars($this->params->get('drawerRightIcon', 'fa-solid fa-chevron-right'), ENT_COMPAT, 'UTF-8');
+// Theme params
+$params_theme_enabled = $this->params->get('theme_enabled', 1);
+
$wa->useStyle('template.user'); // css/user.css
?>
@@ -202,6 +205,21 @@ $wa->useStyle('template.user'); // css/user.css