Spaces:
Running
Running
make as an app
Browse files- compliance.html +14 -0
- index.html +47 -5
- manifest.json +53 -0
- service-worker.js +50 -0
compliance.html
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
|
|
| 1 |
<!DOCTYPE html>
|
|
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Legal Compliance - PhantomDialer</title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
|
|
|
| 8 |
<script src="https://unpkg.com/feather-icons"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
</head>
|
| 10 |
<body class="bg-gray-50 min-h-screen">
|
| 11 |
<div class="container mx-auto px-4 py-12 max-w-4xl">
|
|
|
|
| 1 |
+
|
| 2 |
<!DOCTYPE html>
|
| 3 |
+
<html manifest="manifest.json">
|
| 4 |
<html lang="en">
|
| 5 |
<head>
|
| 6 |
<meta charset="UTF-8">
|
| 7 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 8 |
<title>Legal Compliance - PhantomDialer</title>
|
| 9 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
+
<link rel="manifest" href="manifest.json">
|
| 11 |
<script src="https://unpkg.com/feather-icons"></script>
|
| 12 |
+
<script>
|
| 13 |
+
if ('serviceWorker' in navigator) {
|
| 14 |
+
navigator.serviceWorker.register('/service-worker.js')
|
| 15 |
+
.then(registration => {
|
| 16 |
+
console.log('ServiceWorker registration successful');
|
| 17 |
+
})
|
| 18 |
+
.catch(err => {
|
| 19 |
+
console.log('ServiceWorker registration failed: ', err);
|
| 20 |
+
});
|
| 21 |
+
}
|
| 22 |
+
</script>
|
| 23 |
</head>
|
| 24 |
<body class="bg-gray-50 min-h-screen">
|
| 25 |
<div class="container mx-auto px-4 py-12 max-w-4xl">
|
index.html
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
|
|
| 1 |
<!DOCTYPE html>
|
|
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
|
@@ -21,9 +23,23 @@
|
|
| 21 |
}
|
| 22 |
}
|
| 23 |
</script>
|
|
|
|
| 24 |
<script src="https://unpkg.com/feather-icons"></script>
|
| 25 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 26 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
.vanta-bg {
|
| 28 |
position: absolute;
|
| 29 |
top: 0;
|
|
@@ -221,8 +237,10 @@
|
|
| 221 |
|
| 222 |
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js"></script>
|
| 223 |
<script>
|
| 224 |
-
|
| 225 |
-
|
|
|
|
|
|
|
| 226 |
mouseControls: true,
|
| 227 |
touchControls: true,
|
| 228 |
gyroControls: false,
|
|
@@ -238,9 +256,33 @@ shininess: 35.00,
|
|
| 238 |
});
|
| 239 |
</script>
|
| 240 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 241 |
feather.replace();
|
| 242 |
-
|
| 243 |
-
function showRecentNumbers() {
|
| 244 |
// This would fetch from API in production
|
| 245 |
const numbers = [
|
| 246 |
{number: "+91 XXXX-XXX-123", lastUsed: "2 hours ago"},
|
|
|
|
| 1 |
+
|
| 2 |
<!DOCTYPE html>
|
| 3 |
+
<html manifest="manifest.json">
|
| 4 |
<html lang="en">
|
| 5 |
<head>
|
| 6 |
<meta charset="UTF-8">
|
|
|
|
| 23 |
}
|
| 24 |
}
|
| 25 |
</script>
|
| 26 |
+
<link rel="manifest" href="manifest.json">
|
| 27 |
<script src="https://unpkg.com/feather-icons"></script>
|
| 28 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 29 |
+
<script>
|
| 30 |
+
if ('serviceWorker' in navigator) {
|
| 31 |
+
window.addEventListener('load', () => {
|
| 32 |
+
navigator.serviceWorker.register('/service-worker.js')
|
| 33 |
+
.then(registration => {
|
| 34 |
+
console.log('ServiceWorker registration successful');
|
| 35 |
+
})
|
| 36 |
+
.catch(err => {
|
| 37 |
+
console.log('ServiceWorker registration failed: ', err);
|
| 38 |
+
});
|
| 39 |
+
});
|
| 40 |
+
}
|
| 41 |
+
</script>
|
| 42 |
+
<style>
|
| 43 |
.vanta-bg {
|
| 44 |
position: absolute;
|
| 45 |
top: 0;
|
|
|
|
| 237 |
|
| 238 |
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js"></script>
|
| 239 |
<script>
|
| 240 |
+
// Remove Vanta.js on mobile to improve performance
|
| 241 |
+
if (!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
|
| 242 |
+
VANTA.WAVES({
|
| 243 |
+
el: "#vanta-bg",
|
| 244 |
mouseControls: true,
|
| 245 |
touchControls: true,
|
| 246 |
gyroControls: false,
|
|
|
|
| 256 |
});
|
| 257 |
</script>
|
| 258 |
<script>
|
| 259 |
+
// Add to homescreen prompt
|
| 260 |
+
let deferredPrompt;
|
| 261 |
+
window.addEventListener('beforeinstallprompt', (e) => {
|
| 262 |
+
e.preventDefault();
|
| 263 |
+
deferredPrompt = e;
|
| 264 |
+
const installButton = document.createElement('button');
|
| 265 |
+
installButton.textContent = 'Install App';
|
| 266 |
+
installButton.className = 'fixed bottom-4 left-4 bg-primary-500 text-white px-4 py-2 rounded-full shadow-lg z-50';
|
| 267 |
+
installButton.onclick = () => {
|
| 268 |
+
deferredPrompt.prompt();
|
| 269 |
+
deferredPrompt.userChoice.then((choiceResult) => {
|
| 270 |
+
if (choiceResult.outcome === 'accepted') {
|
| 271 |
+
console.log('User accepted install prompt');
|
| 272 |
+
}
|
| 273 |
+
deferredPrompt = null;
|
| 274 |
+
});
|
| 275 |
+
};
|
| 276 |
+
document.body.appendChild(installButton);
|
| 277 |
+
|
| 278 |
+
// Auto hide after 10 seconds
|
| 279 |
+
setTimeout(() => {
|
| 280 |
+
installButton.style.display = 'none';
|
| 281 |
+
}, 10000);
|
| 282 |
+
});
|
| 283 |
+
|
| 284 |
feather.replace();
|
| 285 |
+
function showRecentNumbers() {
|
|
|
|
| 286 |
// This would fetch from API in production
|
| 287 |
const numbers = [
|
| 288 |
{number: "+91 XXXX-XXX-123", lastUsed: "2 hours ago"},
|
manifest.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```json
|
| 2 |
+
{
|
| 3 |
+
"name": "PhantomDialer",
|
| 4 |
+
"short_name": "PhantomDialer",
|
| 5 |
+
"start_url": "index.html",
|
| 6 |
+
"display": "standalone",
|
| 7 |
+
"background_color": "#6b46c1",
|
| 8 |
+
"theme_color": "#6b46c1",
|
| 9 |
+
"orientation": "portrait-primary",
|
| 10 |
+
"icons": [
|
| 11 |
+
{
|
| 12 |
+
"src": "icons/icon-72x72.png",
|
| 13 |
+
"sizes": "72x72",
|
| 14 |
+
"type": "image/png"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"src": "icons/icon-96x96.png",
|
| 18 |
+
"sizes": "96x96",
|
| 19 |
+
"type": "image/png"
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
"src": "icons/icon-128x128.png",
|
| 23 |
+
"sizes": "128x128",
|
| 24 |
+
"type": "image/png"
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"src": "icons/icon-144x144.png",
|
| 28 |
+
"sizes": "144x144",
|
| 29 |
+
"type": "image/png"
|
| 30 |
+
},
|
| 31 |
+
{
|
| 32 |
+
"src": "icons/icon-152x152.png",
|
| 33 |
+
"sizes": "152x152",
|
| 34 |
+
"type": "image/png"
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"src": "icons/icon-192x192.png",
|
| 38 |
+
"sizes": "192x192",
|
| 39 |
+
"type": "image/png"
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"src": "icons/icon-384x384.png",
|
| 43 |
+
"sizes": "384x384",
|
| 44 |
+
"type": "image/png"
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"src": "icons/icon-512x512.png",
|
| 48 |
+
"sizes": "512x512",
|
| 49 |
+
"type": "image/png"
|
| 50 |
+
}
|
| 51 |
+
]
|
| 52 |
+
}
|
| 53 |
+
```
|
service-worker.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```javascript
|
| 2 |
+
const CACHE_NAME = 'phantom-dialer-v1';
|
| 3 |
+
const ASSETS = [
|
| 4 |
+
'/',
|
| 5 |
+
'/index.html',
|
| 6 |
+
'/compliance.html',
|
| 7 |
+
'/manifest.json',
|
| 8 |
+
'/icons/icon-72x72.png',
|
| 9 |
+
'/icons/icon-96x96.png',
|
| 10 |
+
'/icons/icon-128x128.png',
|
| 11 |
+
'/icons/icon-144x144.png',
|
| 12 |
+
'/icons/icon-152x152.png',
|
| 13 |
+
'/icons/icon-192x192.png',
|
| 14 |
+
'/icons/icon-384x384.png',
|
| 15 |
+
'/icons/icon-512x512.png',
|
| 16 |
+
'https://cdn.tailwindcss.com',
|
| 17 |
+
'https://unpkg.com/feather-icons',
|
| 18 |
+
'https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js',
|
| 19 |
+
'https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js'
|
| 20 |
+
];
|
| 21 |
+
|
| 22 |
+
self.addEventListener('install', (event) => {
|
| 23 |
+
event.waitUntil(
|
| 24 |
+
caches.open(CACHE_NAME)
|
| 25 |
+
.then((cache) => cache.addAll(ASSETS))
|
| 26 |
+
);
|
| 27 |
+
});
|
| 28 |
+
|
| 29 |
+
self.addEventListener('fetch', (event) => {
|
| 30 |
+
event.respondWith(
|
| 31 |
+
caches.match(event.request)
|
| 32 |
+
.then((response) => response || fetch(event.request))
|
| 33 |
+
);
|
| 34 |
+
});
|
| 35 |
+
|
| 36 |
+
self.addEventListener('activate', (event) => {
|
| 37 |
+
const cacheWhitelist = [CACHE_NAME];
|
| 38 |
+
event.waitUntil(
|
| 39 |
+
caches.keys().then((cacheNames) => {
|
| 40 |
+
return Promise.all(
|
| 41 |
+
cacheNames.map((cacheName) => {
|
| 42 |
+
if (cacheWhitelist.indexOf(cacheName) === -1) {
|
| 43 |
+
return caches.delete(cacheName);
|
| 44 |
+
}
|
| 45 |
+
})
|
| 46 |
+
);
|
| 47 |
+
})
|
| 48 |
+
);
|
| 49 |
+
});
|
| 50 |
+
```
|