public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Sterz <s.sterz@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] proxy: switch to "auto" as the default theme
Date: Tue, 14 Mar 2023 15:02:00 +0100	[thread overview]
Message-ID: <20230314140203.1107068-5-s.sterz@proxmox.com> (raw)
In-Reply-To: <20230314140203.1107068-1-s.sterz@proxmox.com>

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

Signed-off-by: Stefan Sterz <s.sterz@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





  parent reply	other threads:[~2023-03-14 14:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 14:01 [pbs-devel] [PATCH widget-toolkit 0/2] Proxmox Dark Theme Fix-ups Round 2 Stefan Sterz
2023-03-14 14:01 ` [pbs-devel] [PATCH widget-toolkit 1/2] utils: move to using the auto theme per default Stefan Sterz
2023-03-14 14:01 ` [pbs-devel] [PATCH widget-toolkit 2/2] dark-theme: increase contrast on check-boxes Stefan Sterz
2023-03-14 14:02 ` Stefan Sterz [this message]
2023-03-14 16:57   ` [pbs-devel] applied: [PATCH proxmox-backup] proxy: switch to "auto" as the default theme Thomas Lamprecht
2023-03-14 14:15 ` [pbs-devel] applied: [pve-devel] [PATCH widget-toolkit 0/2] Proxmox Dark Theme Fix-ups Round 2 Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230314140203.1107068-5-s.sterz@proxmox.com \
    --to=s.sterz@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal