all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Shan Shaji <s.shaji@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve_flutter_frontend] fix: ui: token expiry showing unix epoch time
Date: Tue, 30 Dec 2025 16:48:19 +0100	[thread overview]
Message-ID: <20251230154819.264985-1-s.shaji@proxmox.com> (raw)

When the token expiry is set to 'never', the API returns 0 for the
expire property. After deserialization, this property was being
populated with the Unix epoch time. To fix this, added an additional
check and updated the label to align with our web UI.

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 lib/pages/main_layout_slim.dart | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/pages/main_layout_slim.dart b/lib/pages/main_layout_slim.dart
index 0aca666..4229ef4 100644
--- a/lib/pages/main_layout_slim.dart
+++ b/lib/pages/main_layout_slim.dart
@@ -940,8 +940,9 @@ class MobileAccessManagement extends StatelessWidget {
                     itemCount: aState.tokens.length,
                     itemBuilder: (context, index) {
                       final token = aState.tokens[index];
-                      var expireDate = 'infinite';
-                      if (token.expire != null) {
+                      var expireDate = 'never';
+                      if (token.expire != null &&
+                          token.expire?.millisecondsSinceEpoch != 0) {
                         expireDate = DateFormat.yMd().format(token.expire!);
                       }
 
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


                 reply	other threads:[~2025-12-30 15:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20251230154819.264985-1-s.shaji@proxmox.com \
    --to=s.shaji@proxmox.com \
    --cc=pve-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal