Enable PWA
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 4m14s

This commit is contained in:
Antoni Nuñez Romeu
2026-05-06 16:21:51 +02:00
parent 012d4aa121
commit 5e6e3f04d3
4 changed files with 59 additions and 28 deletions

View File

@@ -11,7 +11,7 @@
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Time Tracker">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
@@ -23,20 +23,5 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!-- Service Worker Registration -->
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('%PUBLIC_URL%/service-worker.js')
.then((registration) => {
console.log('SW registered: ', registration);
})
.catch((registrationError) => {
console.log('SW registration failed: ', registrationError);
});
});
}
</script>
</body>
</html>