Repository navigation
webui: update the header logo and message dots only on changes - #212
Conversation
This applies OpenCCU rootfs patch 0153-WebUI-Fix-ImproveImgUpdates.patch: - header.htm contains both the normal and the red header logo; the red one is hidden by default. SwitchOnFlashLight() and SwitchOffFlashLight() only toggle the "hidden" class instead of reloading the logo image. - setAlarmMessageCount() and setServiceMessageCount() only update the message text and the dot image if they actually changed.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Original OpenCCU rootfs patch: 0153
Original filename:
0153-WebUI-Fix-ImproveImgUpdates.patchOriginal patch: ``''
https://github.com/OpenCCU/OpenCCU/blob/0ba6800df3aa3afea28670d335ec428936bac3de/buildroot-external/package/openccu-base/rootfs-patches/0153-WebUI-Fix-ImproveImgUpdates.patch''''Original changes: OpenCCU/OpenCCU@aac3562d7
The header logo blinks (red/normal) while ReGa is saving, and the alarm/service message counters are refreshed periodically. Both reassigned image sources or HTML on every call, which reloads the images and causes needless DOM updates. This applies the patch:
src/webui/www/ise/htm/header.htm: the header contains the normal logo (headerLogo) and the red logo (headerLogoRed, initiallyhidden) instead of one image whosesrcis switched.src/webui/www_source/ise/js/functions.js(thewebui.jspart):SwitchOnFlashLight()/SwitchOffFlashLight()only toggle the existinghiddenclass (webui.css) of the two logos.setAlarmMessageCount()/setServiceMessageCount()only update the text and the dot image if they actually change.In this repository the logos are
homematic_logo_small.pngandhomematic_logo_small_red.png(both exist inwww/ise/img/); OpenCCU's rootfs patch 0001 replaces them by its own logos, as it does for the single logo today.header.htmkeeps its CRLF line endings. The legacywww/ise/js/functions.j_is not part ofwebui.jsand is left unchanged, as by the original patch. The rootwww/copies are unused legacy files and are left unchanged.Workspaces of the earlier OpenCCU patches
OpenCCU rootfs patch 0001 rewrites exactly these lines (logo file names in
header.htmand inSwitchOn/OffFlashLight()). The OpenCCU cleanup PR will therefore update the workspaces of the earlier patches:header.htmhunk replaces the file names of both logos, and its twoSwitchOn/OffFlashLight()hunks inwebui.jsdisappear (the functions no longer contain file names).webui.js(.origand modified files of 0001, 0029, 0031, 0032, 0038, 0039, 0042, 0044, 0046, 0054, 0056, 0057, 0061, 0077, 0095, 0097, 0099, 0104, 0109, 0111, 0119, 0122, 0125, 0131, 0132, 0135, 0138, 0145, 0146 and 0151) get the new code by the same text replacement. After regenerating, patch 0001 changes as described, 12 other patches only in hunk line numbers, and all other patches are unchanged.Until that cleanup is merged, OpenCCU must not be bumped to a Base revision containing this change.
Validation
header.htmandfunctions.js;node --checkpasses;git diff --check(withcr-at-eol) is clean.scripts/base-patch-migration.py validatewith the canonical Buildroot 2026.08git4archive of this branch (749903d4, sha256567e76e2db2e7c29942dae0a5ce2494bb94879b13d5cb50cfdb4967f10b3f1bd) and--skip-patch 0153, on OpenCCUmaster0ba6800df(current pina4a4a703, equal tomain) with the refreshed workspaces described above: PASS (the other 47 rootfs patches apply with zero fuzz).comparerefuses this case because patch 0001 and other patches change. The validation manifest (file types, modes and hashes of all 4666 entries) was therefore compared directly with a validation of the current pina4a4a703with all 48 patches: byte-identical, includingheader.htmandwebui.js.OpenCCU cleanup PR (removing patch 0153, refreshing the earlier workspaces and updating the pin): OpenCCU/OpenCCU#4457
Generated by Claude Code
Summary by CodeRabbit
Generated by Claude Code