RELEASE V0.0.1.2 : Insertion des données de la BDD + Suppression des données mockées
This commit is contained in:
1 parent
3eed2b9cd4
commit
9b7ff6e295
8 files changed
+1372
-757
No files matched your search
@@ -0,0 +1,24 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
|
||||
<defs>
|
||||
<linearGradient id="sncf-grad" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" stop-color="#0066a4"/>
|
||||
<stop offset="100%" stop-color="#004b7a"/>
|
||||
</linearGradient>
|
||||
<filter id="shadow" x="-10%" y="-10%" width="120%" height="120%">
|
||||
<feDropShadow dx="0" dy="4" stdDeviation="8" flood-color="#000" flood-opacity="0.2"/>
|
||||
</filter>
|
||||
</defs>
|
||||
<rect width="512" height="512" rx="108" fill="url(#sncf-grad)"/>
|
||||
|
||||
<!-- SNCF Red Badge -->
|
||||
<rect x="80" y="80" width="160" height="70" rx="8" fill="#cd0037" filter="url(#shadow)"/>
|
||||
<text x="160" y="130" fill="#ffffff" font-family="Avenir, sans-serif" font-weight="900" font-size="44" text-anchor="middle" letter-spacing="2">SNCF</text>
|
||||
|
||||
<!-- Train Icon -->
|
||||
<g transform="translate(136, 170)" fill="#ffffff">
|
||||
<path d="M120 0C53.7 0 0 53.7 0 120v100c0 33.1 26.9 60 60 60v20c0 11 9 20 20 20s20-9 20-20v-20h80v20c0 11 9 20 20 20s20-9 20-20v-20c33.1 0 60-26.9 60-60V120C240 53.7 186.3 0 120 0zm-80 60h160v60H40V60zm30 150c-11 0-20-9-20-20s9-20 20-20 20 9 20 20-9 20-20 20zm100 0c-11 0-20-9-20-20s9-20 20-20 20 9 20 20-9 20-20 20z"/>
|
||||
</g>
|
||||
|
||||
<!-- TER ZOU text / Tag -->
|
||||
<text x="256" y="440" fill="#ffffff" font-family="Avenir, sans-serif" font-weight="800" font-size="34" text-anchor="middle" letter-spacing="1">FERROVIA RÉGIONS</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "FERROVIA - Sites TER Régionaux",
|
||||
"short_name": "FERROVIA",
|
||||
"description": "Consultez les horaires, l'info trafic et achetez vos billets TER dans toutes les régions de France.",
|
||||
"start_url": "/",
|
||||
"id": "/",
|
||||
"display": "standalone",
|
||||
"background_color": "#ffffff",
|
||||
"theme_color": "#0066a4",
|
||||
"orientation": "portrait-primary",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/icon.svg",
|
||||
"sizes": "any",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/icon.svg",
|
||||
"sizes": "192x192",
|
||||
"type": "image/svg+xml"
|
||||
},
|
||||
{
|
||||
"src": "/icon.svg",
|
||||
"sizes": "512x512",
|
||||
"type": "image/svg+xml"
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
"travel",
|
||||
"transportation"
|
||||
],
|
||||
"lang": "fr-FR",
|
||||
"dir": "ltr",
|
||||
"prefer_related_applications": false
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
const CACHE_NAME = 'ferrovia-pwa-v2';
|
||||
|
||||
self.addEventListener('install', (event) => {
|
||||
self.skipWaiting();
|
||||
});
|
||||
|
||||
self.addEventListener('activate', (event) => {
|
||||
event.waitUntil(
|
||||
caches.keys().then((keys) => {
|
||||
return Promise.all(
|
||||
keys.map((key) => {
|
||||
if (key !== CACHE_NAME) {
|
||||
return caches.delete(key);
|
||||
}
|
||||
})
|
||||
);
|
||||
}).then(() => self.clients.claim())
|
||||
);
|
||||
});
|
||||
|
||||
// Network-First strategy: Always try network first to guarantee live updates
|
||||
self.addEventListener('fetch', (event) => {
|
||||
if (event.request.method !== 'GET') return;
|
||||
|
||||
const url = new URL(event.request.url);
|
||||
|
||||
// Do not cache API or Supabase requests
|
||||
if (url.pathname.startsWith('/api') || url.hostname.includes('supabase')) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.respondWith(
|
||||
fetch(event.request)
|
||||
.then((networkResponse) => {
|
||||
if (networkResponse && networkResponse.status === 200 && networkResponse.type === 'basic') {
|
||||
const responseToCache = networkResponse.clone();
|
||||
caches.open(CACHE_NAME).then((cache) => {
|
||||
cache.put(event.request, responseToCache);
|
||||
});
|
||||
}
|
||||
return networkResponse;
|
||||
})
|
||||
.catch(() => {
|
||||
return caches.match(event.request);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user