diff --git a/assets/site.webmanifest b/assets/site.webmanifest deleted file mode 100644 index 2482fae..0000000 --- a/assets/site.webmanifest +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "Decent Newsroom", - "short_name": "Newsroom", - "icons": [ - { - "src": "/icons/web-app-manifest-192x192.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - }, - { - "src": "/icons/web-app-manifest-512x512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "maskable" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -} diff --git a/public/offline.html b/public/offline.html deleted file mode 100644 index 889220d..0000000 --- a/public/offline.html +++ /dev/null @@ -1,11 +0,0 @@ - - -
- -Please reconnect to use the app.
- - diff --git a/public/service-worker.js b/public/service-worker.js index 62794ef..f88e4c1 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -1,89 +1,11 @@ -const CACHE_NAME = 'newsroom-pwa-v0.0.1'; -const URLS_TO_CACHE = [ - '/offline.html' -]; - -// Install: cache initial assets -self.addEventListener('install', (event) => { - event.waitUntil( - caches.open(CACHE_NAME).then(async (cache) => { - const urls = URLS_TO_CACHE.map(async (url) => { - try { - const response = await fetch(url); - if (response.ok && response.type === 'basic') { - await cache.put(url, response.clone()); - } else { - console.warn(`[SW] Skipped caching ${url}: invalid response`); - } - } catch (err) { - console.warn(`[SW] Failed to fetch ${url}:`, err); - } - }); - - await Promise.all(urls); - }) - ); - self.skipWaiting(); +self.addEventListener('install', async (event) => { + // Activate the service worker immediately after install + await self.skipWaiting(); }); -// Activate: clean up old caches self.addEventListener('activate', (event) => { - event.waitUntil( - caches.keys().then((cacheNames) => - Promise.all( - cacheNames - .filter((name) => name !== CACHE_NAME) - .map((name) => caches.delete(name)) - ) - ) - ); - self.clients.claim(); + // Take control of all clients immediately + event.waitUntil(self.clients.claim()); }); -// Fetch: serve from cache, fallback to network, then offline -self.addEventListener('fetch', (event) => { - const request = event.request; - - // Only handle HTTP GET requests - if ( - request.method !== 'GET' || - !request.url.startsWith('http') - ) { - return; - } - - // Skip cache for dynamic routes - const isDynamic = request.url.includes('/cat/') ; - // Exclude dynamic paths - const isExcluded = - request.url.startsWith('/login') || - request.url.startsWith('/logout') || - request.url.startsWith('/_components/'); - - if (isDynamic || isExcluded) { - return; // Don't intercept - } - - event.respondWith( - caches.match(request).then((cached) => { - if (cached) return cached; - - return fetch(request) - .then((response) => { - // Optionally cache fetched responses - if ( - response && - response.status === 200 && - response.type === 'basic' - ) { - const responseClone = response.clone(); - caches.open(CACHE_NAME).then((cache) => - cache.put(request, responseClone) - ); - } - return response; - }) - .catch(() => caches.match('/offline.html')); - }) - ); -}); +// No fetch or cache handlers — fully fall-through diff --git a/templates/static/about.html.twig b/templates/static/about.html.twig index 8727143..3a9223a 100644 --- a/templates/static/about.html.twig +++ b/templates/static/about.html.twig @@ -24,6 +24,7 @@We do not store user credentials, emails, or passwords. Authentication is done via Nostr public keys (npubs).
+We do not store user credentials, emails, or passwords. Authentication is done via Nostr keys.
-{#Some data is stored and linked to your npub, including:
#} -{#Some data is stored and linked to your npub for debug and accounting purposes:
+Content submitted for indexing may remain publicly discoverable even if a user stops using the platform.
#} -{# #} +The platform operates on the basis of open access content.
+The platform operates on the basis of open-access content.
We do not endorse or verify third-party content and are not responsible for its accuracy.
We reserve the right to include and exclude content from the indexer at our own discretion.
{#By requesting indexing, you agree that your content may be made publicly discoverable unless otherwise specified.
#}