feat(server): working friend page

This commit is contained in:
Maieul BOYER 2026-02-08 23:34:44 +01:00
parent 83433186f3
commit 0b17c760cb
Signed by: maix
SSH key fingerprint: SHA256:iqCzqFFF5KjRixmDExqbAltCIj9ndlBWIGJf3t9Ln9g
2126 changed files with 35620 additions and 42 deletions

View file

@ -0,0 +1,59 @@
let g_permanent = [
'/static/css/bootstrap.min.css',
'/static/js/popper.min.js',
'/static/js/bootstrap.min.js',
'/static/fontawesome/css/fontawesome.min.css',
'/static/fontawesome/css/solid.min.css',
'/static/fontawesome/css/regular.min.css',
'/static/fontawesome/css/brands.min.css',
'/static/fontawesome/webfonts/fa-solid-900.woff2'
];
let g_temp = [
'/static/css/common.css',
'/static/css/friends.css',
'/static/css/index.css',
'/static/js/common.js',
'/',
'/friends/',
'/settings/',
]
self.addEventListener('install', function (e) {
/*
e.waitUntil(
caches.open('fft').then(function (cache) {
return cache.addAll([...g_temp, ...g_permanent]);
})
);
*/
});
self.addEventListener('fetch', function (event) {
/*
event.respondWith(
caches.match(event.request).then(async function (response) {
if (event.request.url in g_temp)
{
let r = await fetch(event.request);
if (r.status === 200)
return r;
return response;
}
return response || fetch(event.request);
})
);
*/
});
self.addEventListener("activate", (event) => {
event.waitUntil(
caches.keys().then((cacheNames) => {
return Promise.all(
cacheNames.map((cacheName) => {
return caches.delete(cacheName);
})
);
})
);
});