Release 0.1.49: self-hosted maps and consented cloud location history

This commit is contained in:
Codex
2026-10-19 00:00:12 +08:00
parent d0b3db7f82
commit a5d2399d2e
58 changed files with 2586 additions and 223 deletions
+9
View File
@@ -0,0 +1,9 @@
import {createFamilyMap} from './controller.js'
import './phone.css'
const map=createFamilyMap(document.getElementById('map'),{onStatus:text=>document.getElementById('status').textContent=text})
// Native layer supplies already-authorized points; no token crosses the WebView boundary.
window.ZhaoMap={setItems:items=>map.setItems(items),setTrack:points=>map.setTrack(points),focus:id=>map.focus(id),fit:()=>map.fit(),setNight:value=>{document.documentElement.dataset.theme=value?'night':'day';map.setNight(value)}}
document.addEventListener('visibilitychange',()=>{if(document.hidden){map.setItems([]);map.setTrack([])}})
window.addEventListener('pagehide',()=>map.setItems([]))
const theme=()=>window.ZhaoMap.setNight(new Date().getHours()>=20||new Date().getHours()<7)
theme();setInterval(theme,60000)