From eeae6ee5cd4ccc940ce4271d766383e69a206d52 Mon Sep 17 00:00:00 2001 From: Andy Oknen Date: Fri, 15 Aug 2025 19:52:07 +0000 Subject: [PATCH] Refactor node version display logic to ensure proper formatting only when both build name and version are available. Update CSS styles for login container and footer margins for improved layout consistency. --- src/webui/static/app.js | 2 +- src/webui/static/login.html | 7 ++----- src/webui/static/style.css | 15 +++++---------- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/webui/static/app.js b/src/webui/static/app.js index 4461dc9a..c12e61cc 100644 --- a/src/webui/static/app.js +++ b/src/webui/static/app.js @@ -68,7 +68,7 @@ function updateNodeInfoDisplay(info) { updateElementText('node-address', info.address || 'N/A'); updateElementText('node-subnet', info.subnet || 'N/A'); updateElementText('node-key', yggUtils.formatPublicKey(info.key) || 'N/A'); - updateElementText('node-version', `${info.build_name} ${info.build_version}` || 'N/A'); + updateElementText('node-version', info.build_name && info.build_version ? `${info.build_name} ${info.build_version}` : 'N/A'); updateElementText('routing-entries', info.routing_entries || '0'); // Update footer version diff --git a/src/webui/static/login.html b/src/webui/static/login.html index c829aa34..2ac879da 100644 --- a/src/webui/static/login.html +++ b/src/webui/static/login.html @@ -24,6 +24,8 @@ justify-content: center; min-height: 100vh; padding: 20px; + position: relative; + z-index: 1; } .login-form { @@ -128,11 +130,6 @@ right: 20px; z-index: 10; } - - .login-container { - position: relative; - z-index: 1; - } diff --git a/src/webui/static/style.css b/src/webui/static/style.css index 1ebf7e1f..001d6bd1 100644 --- a/src/webui/static/style.css +++ b/src/webui/static/style.css @@ -812,7 +812,7 @@ footer { .mobile-controls { display: flex; justify-content: center; - margin: 0px 0px 20px 0px; + margin: 0 0 20px; } footer { @@ -1285,9 +1285,7 @@ button[onclick="copyNodeKey()"]:hover { border-color: var(--border-hover); } -/* Responsive design for peer items */ -@media (max-width: 768px) { -} + /* ======================== */ /* MODAL SYSTEM */ @@ -1394,7 +1392,7 @@ button[onclick="copyNodeKey()"]:hover { } .modal-content p { - margin: 0 0 16px 0; + margin: 0 0 16px; line-height: 1.5; } @@ -1561,7 +1559,7 @@ button[onclick="copyNodeKey()"]:hover { } .config-info h3 { - margin: 0 0 10px 0; + margin: 0 0 10px; color: var(--text-heading); font-size: 1.5em; } @@ -2050,10 +2048,7 @@ input:checked + .slider:before { transform: translateY(-1px); } -/* JSON Syntax highlighting (basic) */ -.json-editor { - color: var(--text-body); -} + /* Mobile responsiveness for JSON editor */ @media (max-width: 768px) {