배터리 센서 섹션 통합
This commit is contained in:
+6
-3
@@ -632,7 +632,7 @@ function ensureFindMyDeviceShell() {
|
|||||||
<div class="settingRow locateRow" id="updateBtn"><span id="labelForceUpdate"></span></div>
|
<div class="settingRow locateRow" id="updateBtn"><span id="labelForceUpdate"></span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="settingTitle"><span id="titleBattery"></span></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="labelBatteryState"></span><span id="batteryStatus"></span></div>
|
||||||
<div class="settingRow"><span id="labelBatteryLevel"></span><span id="Battery"></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>
|
<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));
|
const entries = Object.entries(rows || {}).filter(([, value]) => normalizeDisplayValue(value));
|
||||||
if (!entries.length) return;
|
if (!entries.length) return;
|
||||||
|
|
||||||
activeSectionIds.add(sectionKey);
|
const isBatterySection = sectionKey === 'battery';
|
||||||
const section = ensureSensorSection(sectionKey);
|
const section = isBatterySection ? document.getElementById('batterySection') : ensureSensorSection(sectionKey);
|
||||||
if (!section) return;
|
if (!section) return;
|
||||||
|
|
||||||
|
if (!isBatterySection) {
|
||||||
|
activeSectionIds.add(sectionKey);
|
||||||
const title = document.getElementById(`sensorTitleText_${sectionKey}`);
|
const title = document.getElementById(`sensorTitleText_${sectionKey}`);
|
||||||
if (title) title.textContent = t[sectionKey] || sectionKey;
|
if (title) title.textContent = t[sectionKey] || sectionKey;
|
||||||
|
}
|
||||||
|
|
||||||
entries.forEach(([key, value]) => {
|
entries.forEach(([key, value]) => {
|
||||||
activeRowIds.add(`sensor_${sectionKey}_${key}`);
|
activeRowIds.add(`sensor_${sectionKey}_${key}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user