[pve-devel] [PATCH pve_flutter_frontend] fix: ui: token expiry showing unix epoch time

Shan Shaji s.shaji at proxmox.com
Tue Dec 30 16:48:19 CET 2025


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 at 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





More information about the pve-devel mailing list