vue.js used

This commit is contained in:
cpu
2025-05-07 22:17:29 +02:00
parent 049866ecd7
commit 04dd879c24
33 changed files with 4471 additions and 0 deletions

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

21
public/manifest.json Normal file
View File

@@ -0,0 +1,21 @@
{
"name": "Nexus Timer",
"short_name": "NexusTimer",
"description": "A dynamic multi-player timer for games and workshops.",
"start_url": "/",
"display": "standalone",
"background_color": "#1f2937",
"theme_color": "#3b82f6",
"icons": [
{
"src": "/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}

49
public/service-worker.js Normal file
View File

@@ -0,0 +1,49 @@
const CACHE_NAME = 'nexus-timer-cache-v1';
const urlsToCache = [
'/',
'/index.html',
'/manifest.json',
'/favicon.ico',
'/icons/icon-192x192.png',
'/icons/icon-512x512.png',
// Add other static assets here, like JS/CSS bundles if not dynamically named
// Vite typically names bundles with hashes, so caching them directly might be tricky
// For a PWA, focus on caching the app shell and key static assets
];
self.addEventListener('install', event => {
event.waitUntil(
caches.open(CACHE_NAME)
.then(cache => {
console.log('Opened cache');
return cache.addAll(urlsToCache);
})
);
});
self.addEventListener('fetch', event => {
event.respondWith(
caches.match(event.request)
.then(response => {
if (response) {
return response; // Serve from cache
}
return fetch(event.request); // Fetch from network
})
);
});
self.addEventListener('activate', event => {
const cacheWhitelist = [CACHE_NAME];
event.waitUntil(
caches.keys().then(cacheNames => {
return Promise.all(
cacheNames.map(cacheName => {
if (cacheWhitelist.indexOf(cacheName) === -1) {
return caches.delete(cacheName);
}
})
);
})
);
});