diff --git a/js/main.js b/js/main.js index 8249991..478c91e 100644 --- a/js/main.js +++ b/js/main.js @@ -57,7 +57,7 @@ const deviceLang = (navigator.language || navigator.userLanguage || "en").starts notifications: "알림", alerts: "알림/통화", environment: "센서", - networkType: "네트워크 방식", + networkType: "연결 방법", wifiState: "Wi-Fi 상태", wifiBssid: "Wi-Fi BSSID", mobileDataRoaming: "데이터 로밍", @@ -264,7 +264,7 @@ const deviceLang = (navigator.language || navigator.userLanguage || "en").starts notifications: "Notifications", alerts: "Alerts & Calls", environment: "Sensors", - networkType: "Network Type", + networkType: "Connection Type", wifiState: "Wi-Fi State", wifiBssid: "Wi-Fi BSSID", mobileDataRoaming: "Data Roaming", @@ -909,6 +909,7 @@ function applyLanguage(langCode) { const el = document.getElementById(id); if (el) el.textContent = labelMap[id]; } + cleanupLegacyConnectionRow(); document.querySelectorAll('[data-sensor-title="1"]').forEach(title => { const sectionKey = title.dataset.sensorSection; @@ -958,6 +959,20 @@ function updateDOM(data) { toggleOptionalRow('WbatteryStatus', data.wstate); toggleOptionalRow('WBattery', data.wlevel); updateSensorSections(data.sensors || {}); + cleanupLegacyConnectionRow(); +} + +function cleanupLegacyConnectionRow() { + const valueEl = document.getElementById('connectionType'); + const row = valueEl?.closest('.settingRow'); + row?.remove(); + + const title = document.getElementById('titleEtc'); + const nextSection = title?.nextElementSibling; + if (title && nextSection?.classList?.contains('settingSection') && !nextSection.querySelector('.settingRow')) { + nextSection.remove(); + title.remove(); + } } function updateSensorSections(sections) {