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

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

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





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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 14:01 [pmg-devel] [PATCH widget-toolkit 0/2] Proxmox Dark Theme Fix-ups Round 2 Stefan Sterz
2023-03-14 14:01 ` [pmg-devel] [PATCH widget-toolkit 1/2] utils: move to using the auto theme per default Stefan Sterz
2023-03-14 14:01 ` [pmg-devel] [PATCH widget-toolkit 2/2] dark-theme: increase contrast on check-boxes Stefan Sterz
2023-03-14 14:02 ` [pmg-devel] [PATCH pmg-gui 1/2] mobile quarantine: properly style main logo Stefan Sterz
2023-03-14 14:02 ` [pmg-devel] [PATCH pmg-gui 2/2] index template: make it easier to use the auto theme per default Stefan Sterz
2023-03-14 14:02 ` Stefan Sterz [this message]
2023-03-14 14:15 ` [pmg-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-8-s.sterz@proxmox.com \
    --to=s.sterz@proxmox.com \
    --cc=pmg-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