배터리 센서 섹션 통합

This commit is contained in:
seo
2026-07-04 06:20:23 +09:00
parent 2cc75b167a
commit 694feb0505
+8 -5
View File
@@ -632,7 +632,7 @@ function ensureFindMyDeviceShell() {
<div class="settingRow locateRow" id="updateBtn"><span id="labelForceUpdate"></span></div>
</div>
<div class="settingTitle"><span id="titleBattery"></span></div>
<div class="settingSection">
<div class="settingSection" id="batterySection">
<div class="settingRow"><span id="labelBatteryState"></span><span id="batteryStatus"></span></div>
<div class="settingRow"><span id="labelBatteryLevel"></span><span id="Battery"></span></div>
<div class="settingRow"><span id="labelWatchBatteryState"></span><span id="WbatteryStatus"></span></div>
@@ -1163,12 +1163,15 @@ function updateSensorSections(sections) {
const entries = Object.entries(rows || {}).filter(([, value]) => normalizeDisplayValue(value));
if (!entries.length) return;
activeSectionIds.add(sectionKey);
const section = ensureSensorSection(sectionKey);
const isBatterySection = sectionKey === 'battery';
const section = isBatterySection ? document.getElementById('batterySection') : ensureSensorSection(sectionKey);
if (!section) return;
const title = document.getElementById(`sensorTitleText_${sectionKey}`);
if (title) title.textContent = t[sectionKey] || sectionKey;
if (!isBatterySection) {
activeSectionIds.add(sectionKey);
const title = document.getElementById(`sensorTitleText_${sectionKey}`);
if (title) title.textContent = t[sectionKey] || sectionKey;
}
entries.forEach(([key, value]) => {
activeRowIds.add(`sensor_${sectionKey}_${key}`);