[pmg-devel] [PATCH pmg-api] proxy: make the "auto" theme the default

Stefan Sterz s.sterz at proxmox.com
Tue Mar 14 15:02:03 CET 2023


by using the "auto" theme per default, the user's preferred theme is
used automatically.

Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
---
 src/PMG/Service/pmgproxy.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/PMG/Service/pmgproxy.pm b/src/PMG/Service/pmgproxy.pm
index 9b5ba52..310519a 100755
--- a/src/PMG/Service/pmgproxy.pm
+++ b/src/PMG/Service/pmgproxy.pm
@@ -230,6 +230,10 @@ sub get_index {
 	}
     }
 
+    if ($theme eq "") {
+	$theme = "auto"
+    }
+
     $token = PMG::Ticket::assemble_csrf_prevention_token($username)
 	if defined($username);
 
@@ -270,7 +274,6 @@ sub get_index {
 	wtversion => $wtversion,
 	quarantinelink => $quarantinelink,
 	theme => $theme,
-	auto => $theme == "auto",
     };
 
     my $template_name;
-- 
2.30.2





More information about the pmg-devel mailing list