나의 찾기 기존 HTML 호환 분기 제거

This commit is contained in:
seo
2026-06-29 05:38:59 +09:00
parent ba6fdbdf54
commit b77be98285
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ Home Assistant에 기록된 Galaxy Z Fold7의 위치, 배터리, 활동 상태,
표시할 모바일 앱 센서 목록은 `/custom/common/config.php``findmydevice_sensor_sections`에서 섹션 단위로 관리합니다. 화면 CSS 원본은 `/custom/common/css/findmydevice.css`를 사용합니다. 기존 운영 HTML이 `/custom/findmydevice/css/style.css`를 참조해도 호환 파일이 공용 CSS를 import합니다.
페이지 본문에는 `<div id="findmydevice"></div>`만 두면 됩니다. `main.js``#mySettingContainer`가 없을 때 지도, 헤더, 설정/기록/위치/업데이트/배터리/활동 섹션과 iOS PWA 안내 영역을 자동으로 생성합니다. 기존처럼 전체 HTML을 직접 넣어둔 페이지에서는 이미 존재하는 `#mySettingContainer`를 그대로 사용합니다.
페이지 본문에는 `<div id="findmydevice"></div>`만 두면 됩니다. `main.js`이 컨테이너 안에 지도, 헤더, 설정/기록/위치/업데이트/배터리/활동 섹션과 iOS PWA 안내 영역을 항상 자동 생성합니다.
위치 갱신 명령은 `/custom/common/config.php``findmydevice_location_refresh` 설정을 사용합니다. `seoul`, `main` Home Assistant 프로필의 `notify.mobile_app_seocaegeonyi_z_fold7` 서비스로 Companion App notification command를 보냅니다. 자동 업데이트가 켜지면 Android high accuracy mode를 5초 간격으로 설정하고 `force_on`을 보낸 뒤 `request_location_update``command_update_sensors`를 함께 호출합니다. 자동 업데이트 중에는 10초마다 위치 요청과 센서 업데이트 요청을 반복하고, 자동 업데이트를 끄거나 페이지를 벗어나면 `force_off`를 보냅니다.
+4 -2
View File
@@ -460,8 +460,6 @@ let langCode = localStorage.getItem("currentLang") || deviceLang,
wakeLock = null;
function ensureFindMyDeviceShell() {
if (document.getElementById('mySettingContainer')) return;
let mount = document.getElementById('findmydevice');
if (!mount) {
mount = document.createElement('div');
@@ -469,6 +467,10 @@ function ensureFindMyDeviceShell() {
document.body.prepend(mount);
}
document.querySelectorAll('#mySettingContainer, #ios-pwa-tooltip').forEach(el => {
if (!mount.contains(el)) el.remove();
});
mount.innerHTML = `
<div id="mySettingContainer" style="user-select: none;">
<div id="settingsHeader">