feat: add listing edit mode with owner detection, fix service worker API caching for external domain

This commit is contained in:
2026-02-04 14:57:34 +01:00
parent 0830af9c0e
commit 5895ab7e98
10 changed files with 245 additions and 63 deletions

View File

@@ -1,4 +1,4 @@
const CACHE_NAME = 'dgray-v28';
const CACHE_NAME = 'dgray-v29';
const STATIC_ASSETS = [
'/',
'/index.html',
@@ -57,7 +57,13 @@ self.addEventListener('fetch', (event) => {
if (request.method !== 'GET') return;
// API calls: Network First
// API calls: Network First (external API domain)
if (url.hostname === 'api.dgray.io') {
event.respondWith(networkFirst(request));
return;
}
// Legacy: API calls via path
if (url.pathname.includes('/api/')) {
event.respondWith(networkFirst(request));
return;