[pbs-devel] [PATCH proxmox-backup] proxy: switch to "auto" as the default theme

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


use the "auto" theme per default. it uses a media query to detect the
users preferred theme.

Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
---
 src/bin/proxmox-backup-proxy.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/bin/proxmox-backup-proxy.rs b/src/bin/proxmox-backup-proxy.rs
index 85b6a123..d93840c5 100644
--- a/src/bin/proxmox-backup-proxy.rs
+++ b/src/bin/proxmox-backup-proxy.rs
@@ -103,9 +103,9 @@ fn get_theme(headers: &http::HeaderMap) -> String {
     };
 
     match cookie_from_header(headers, "PBSThemeCookie") {
-        Some(theme) if theme == "auto" => theme,
-        Some(theme) if theme != "__default__" && exists(&theme) => theme,
-        _ => String::from(""),
+        Some(theme) if theme == "crisp" => String::from(""),
+        Some(theme) if exists(&theme) => theme,
+        _ => String::from("auto"),
     }
 }
 
-- 
2.30.2






More information about the pbs-devel mailing list