diff --git a/html/assets/js/topbar-logo.js b/html/assets/js/topbar-logo.js
index 5ea5ccc..ba2293a 100644
--- a/html/assets/js/topbar-logo.js
+++ b/html/assets/js/topbar-logo.js
@@ -3,8 +3,6 @@
* Global configuration handler for UI elements
* - Updates Topbar Logo based on device type
* - Shows/Hides "Screen" sidebar tab based on device type
- * - Updates sidebar device name
- * - Shows hotspot badge in sidebar when in hotspot mode
*/
document.addEventListener('DOMContentLoaded', () => {
let config = null;
@@ -44,28 +42,17 @@ document.addEventListener('DOMContentLoaded', () => {
if (navScreenElements.length > 0) {
navScreenElements.forEach(navScreen => {
if (isModuleAirPro) {
+ // Ensure it's visible (bootstrap nav-link usually block or flex)
if (navScreen.style.display === 'none') {
navScreen.style.display = 'flex';
}
} else {
+ // Hide if not pro
if (navScreen.style.display !== 'none') {
navScreen.style.display = 'none';
}
}
});
}
-
- // 3. Sidebar device name
- if (config.deviceName) {
- document.querySelectorAll('.sideBar_sensorName').forEach(el => {
- el.textContent = config.deviceName;
- });
- document.title = config.deviceName;
- }
-
- // 4. Hotspot badge in sidebar
- document.querySelectorAll('.sidebar-hotspot-badge').forEach(badge => {
- badge.style.display = (config.WIFI_status === 'hotspot') ? '' : 'none';
- });
}
});
diff --git a/html/wifi.html b/html/wifi.html
index b944b9c..c762635 100755
--- a/html/wifi.html
+++ b/html/wifi.html
@@ -464,6 +464,11 @@ function wifi_scan(){
document.getElementById('card-wifi-scan').style.display = '';
}
+ // Update hotspot badge in sidebar
+ document.querySelectorAll('.sidebar-hotspot-badge').forEach(function(badge) {
+ badge.style.display = (data.WIFI_status === 'hotspot') ? '' : 'none';
+ });
+
$.ajax({
url: 'launcher.php?type=RTC_time',
dataType: 'text',