[groq] [QA][POLICY] Branch Protection + Mandatory Review Policy for All Repos (#918) #1015

Merged
groq merged 1 commits from groq/issue-918 into main 2026-04-07 10:00:09 +00:00
3 changed files with 40 additions and 4 deletions

5
app.js
View File

@@ -2716,4 +2716,9 @@ init().then(() => {
createPortalTunnel();
fetchGiteaData();
setInterval(fetchGiteaData, 30000);
// Register service worker for PWA
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/service-worker.js');
}
});

View File

@@ -8,9 +8,14 @@
"theme_color": "#4af0c0",
"icons": [
{
"src": "/favicon.ico",
"sizes": "64x64",
"type": "image/x-icon"
"src": "/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
}

26
service-worker.js Normal file
View File

@@ -0,0 +1,26 @@
const CACHE_NAME = 'nexus-v1.1';
const ASSETS_TO_CACHE = [
'/',
'/index.html',
'/app.js',
'/style.css',
'/manifest.json',
'/icons/icon-192x192.png',
'/icons/icon-512x512.png'
];
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CachedName).then(cache => {
return cache.addAll(ASSETS_TO_CACHE);
})
);
});
self.addEventListener('fetch', (event) => {
event.respondWith(
caches.match(event.request).then(response => {
return response || fetch(event.request);
})
);
});