diff --git a/demo/smoke_volumetric_setting.mjs b/demo/smoke_volumetric_setting.mjs index 62ca0357..acd7065d 100644 --- a/demo/smoke_volumetric_setting.mjs +++ b/demo/smoke_volumetric_setting.mjs @@ -37,7 +37,11 @@ const res = await page.evaluate(async () => { out.dialogOpens = await openSettings(); const display = q('.hpf-card[data-card="display"]'); const ids = [...display.querySelectorAll('.hpf-toggle > input[type="checkbox"]')].map((i) => i.id); - out.thirdInDisplay = JSON.stringify(ids) === JSON.stringify(['gs-room-tooltip', 'gs-radar-live', 'gs-volumetric-view']); + out.thirdInDisplay = JSON.stringify(ids.slice(0, 3)) === JSON.stringify(['gs-room-tooltip', 'gs-radar-live', 'gs-volumetric-view']); + // #792 appends its control without moving the established Display settings. + out.batteryFollowsExisting = JSON.stringify(ids) === JSON.stringify([ + 'gs-room-tooltip', 'gs-radar-live', 'gs-volumetric-view', 'gs-device-battery', + ]); const row = q('#gs-volumetric-view').closest('.hpf-toggle')?.parentElement ?? null; out.rowTitleAndIcon = !!row && row.textContent.includes(c._t('gs.volumetric_view')) && !!row.querySelector('ha-icon[icon="mdi:cube-outline"]'); diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 67cf1c1c..d705101f 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -5,7 +5,8 @@ - Battery-powered devices now show a compact charge indicator: green at 60–100%, amber at 20–59%, red below 20%, or grey with a question mark when unavailable. It sits beside the whole device face without a percentage label. General - settings can hide it installation-wide; LED strips have no indicator + settings can hide it installation-wide; the new option follows the existing + Display controls without moving them. LED strips have no indicator ([#792](https://github.com/Matysh/houseplan-card/issues/792)). - Fixed creating a room from part of a longer independent wall failing with diff --git a/docs/CHANGELOG.ru.md b/docs/CHANGELOG.ru.md index 077b762c..5663ba61 100755 --- a/docs/CHANGELOG.ru.md +++ b/docs/CHANGELOG.ru.md @@ -11,7 +11,8 @@ - У батарейных устройств появилась компактная индикация заряда: зелёная при 60–100%, жёлтая при 20–59%, красная ниже 20%, серая с вопросом при отсутствии данных. Значок находится справа от всего блока устройства, без цифры процентов. - Его можно отключить для всех карточек в общих настройках; у LED-лент значка нет + Его можно отключить для всех карточек в общих настройках; новая опция добавлена + после существующих строк «Отображения», не смещая их. У LED-лент значка нет ([#792](https://github.com/Matysh/houseplan-card/issues/792)). - Исправлен отказ создания комнаты на части длинной отдельной стены из-за diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 9de449e4..66c210cb 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -13,7 +13,7 @@ size must not leak into this independent frame. Demo fixtures use the same MDI paths so pixel tests do not substitute an emoji or an arbitrary test symbol. The owner also approved a size-budget recalibration. Fresh source builds move -initial View gzip from 301037 to 302537 bytes (+1500); the existing rolling +initial View gzip from 301037 to 302532 bytes (+1495); the existing rolling ceiling 301040 plus its unchanged 2000-byte band already admits this result. The absolute wall moves to 320000 bytes, restoring 6.3% reserve over the measured pre-feature reference. Raw dist moves from 2705833 to 2712880 bytes; only that diff --git a/src/editors/general-settings-dialog.ts b/src/editors/general-settings-dialog.ts index 82c1e807..4df1496e 100644 --- a/src/editors/general-settings-dialog.ts +++ b/src/editors/general-settings-dialog.ts @@ -95,11 +95,6 @@ export function renderGeneralSettingsDialog(this: HouseplanEditorRuntime): Templ title: supportT(lang, 'gs.show_room_tooltip'), caption: st('gs.show_room_tooltip_hint'), checked: d.showRoomTooltip, onChange: (v) => set({ showRoomTooltip: v }), })} - ${toggleRow({ - id: 'gs-device-battery', icon: 'mdi:battery-outline', - title: st('gs.show_device_battery'), caption: st('gs.show_device_battery_hint'), - checked: d.showDeviceBattery, onChange: (v) => set({ showDeviceBattery: v }), - })} ${toggleRow({ id: 'gs-radar-live', icon: 'mdi:radar', title: st('gs.radar_show_live'), caption: st('gs.radar_show_live_hint'), @@ -109,6 +104,11 @@ export function renderGeneralSettingsDialog(this: HouseplanEditorRuntime): Templ id: 'gs-volumetric-view', icon: 'mdi:cube-outline', title: t('gs.volumetric_view'), caption: st('gs.volumetric_view_hint'), checked: d.volumetricView, onChange: (v) => set({ volumetricView: v }), + })} + ${toggleRow({ + id: 'gs-device-battery', icon: 'mdi:battery-outline', + title: st('gs.show_device_battery'), caption: st('gs.show_device_battery_hint'), + checked: d.showDeviceBattery, onChange: (v) => set({ showDeviceBattery: v }), })}`, })} ${formCard({