feat: use AprilTag instead of QR code

This commit is contained in:
Schuwi
2025-09-14 18:52:24 +02:00
parent 788ad54724
commit 589c9964aa
600 changed files with 12814 additions and 122 deletions

View File

@@ -66,6 +66,22 @@ window.addEventListener("phx:download_file", (event) => {
window.URL.revokeObjectURL(url)
})
// Add AprilTag download functionality
window.addEventListener("phx:download_apriltag", (event) => {
const { filename, url } = event.detail
// Create download link using the static file URL
const link = document.createElement('a')
link.href = url
link.download = filename
link.setAttribute('target', '_blank') // Open in new tab as fallback
document.body.appendChild(link)
link.click()
// Clean up
document.body.removeChild(link)
})
// expose liveSocket on window for web console debug logs and latency simulation:
// >> liveSocket.enableDebug()
// >> liveSocket.enableLatencySim(1000) // enabled for duration of browser session