-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
54 lines (50 loc) · 2.09 KB
/
index.html
File metadata and controls
54 lines (50 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Bitcoin payments via Cashu and Lightning">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Satoshi Pay">
<link rel="icon" type="image/png" sizes="128x128" href="/128x128.png">
<link rel="icon" type="image/png" sizes="96x96" href="/96x96.png">
<link rel="icon" type="image/png" sizes="32x32" href="/32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/16x16.png">
<link rel="icon" type="image/ico" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="manifest" href="/manifest.json">
<meta name="theme-color" content="#FF8C00">
<title>Satoshi Pay - Cashu Wallet</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js')
.then(registration => {
console.log('✅ Service Worker registered:', registration)
setInterval(() => {
registration.update()
}, 60000)
registration.addEventListener('updatefound', () => {
const newWorker = registration.installing
newWorker.addEventListener('statechange', () => {
if (newWorker.state === 'installed' && navigator.serviceWorker.controller) {
if (confirm('New version available! Reload to update?')) {
window.location.reload()
}
}
})
})
})
.catch(error => {
console.log('❌ Service Worker registration failed:', error)
})
})
}
</script>
</body>
</html>